SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 17/07/2012, 02:51 PM   #1
Math3us
Huge Clucker
 
Math3us's Avatar
 
Join Date: Jul 2012
Location: Cid.Tiradentes-SP
Posts: 487
Reputation: 25
Default meus comandos parou de funcionar

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/admins", true) == 0)
	{
    new Jogador[24];
    new count5;
    new msg[120];
    for(new i=0; i<MAX_PLAYERS; i++){
    if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
    GetPlayerName(i,Jogador,24);
    format(msg,sizeof(msg),"Admins Online: %s", Jogador);
    SendClientMessage(playerid, 0xFFFFFFAA, msg);
    count5++;
    }
    }
    if(count5 == 0){
   SendClientMessage(playerid, 0xFFFFFFAA, "Nenhum Admin Online No Momento Aguarde.");
   }
   return 1;
}
 // ==================================sistema afk==================================================================================
    if(strcmp("/afk", cmdtext, true, 10) == 0)
    {
    new pname[MAX_PLAYER_NAME];
    new string [256];
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    format(string, sizeof(string), "{00FF7F}[AFK]: {FFFFFF}%s Entrou no Modo AFK! {00FF7F}(/afk)", pname);
    SendClientMessageToAll(0x00F400AA, string);
    SetPlayerHealth(playerid, 999999);
    TogglePlayerControllable(playerid, 0);
    return 1;
}
//=================================sair afk========================================================================================
    if(strcmp("/sairafk", cmdtext, true, 10) == 0)
    {
    new pname[MAX_PLAYER_NAME];
    new string [256];
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    format(string, sizeof(string), "{00FF7F}[AFK]: {FFFFFF}%s Saiu do modo! {00FF7F}(/afk)", pname);
    SendClientMessageToAll(0x00F400AA, string);
    TogglePlayerControllable(playerid, 1);
    SetPlayerHealth(playerid, 100.0);
    return 1;
}
//================================sistema kit======================================================================================
	if(strcmp("/kit", cmdtext, true, 10) == 0)
	{
	ResetPlayerWeapons(playerid);
	GivePlayerWeapon(playerid, 24, 99999);
	GivePlayerWeapon(playerid, 30, 99999);
	GivePlayerWeapon(playerid, 26, 99999);
	GivePlayerWeapon(playerid, 8, 99999);
	GivePlayerWeapon(playerid, 18, 99999);
	GivePlayerWeapon(playerid, 32, 99999);
	GivePlayerWeapon(playerid, 1, 99999);
	GivePlayerWeapon(playerid, 33, 99999);
	GivePlayerWeapon(playerid, 46, 99999);
	GivePlayerWeapon(playerid, 44, 99999);
	SendClientMessage(playerid, -4, "Voce usou /kit");
	return 1;
}
//=================================sistema kit2====================================================================================
	if(strcmp("/kit2", cmdtext, true, 10) == 0)
	{
	ResetPlayerWeapons(playerid);
	GivePlayerWeapon(playerid, 22, 99999);
	GivePlayerWeapon(playerid, 1, 99999);
	GivePlayerWeapon(playerid, 9, 99999);
	GivePlayerWeapon(playerid, 25, 99999);
	GivePlayerWeapon(playerid, 31, 99999);
	GivePlayerWeapon(playerid, 28, 99999);
	GivePlayerWeapon(playerid, 34, 99999);
	GivePlayerWeapon(playerid, 39, 99999);
	GivePlayerWeapon(playerid, 40, 99999);
	GivePlayerWeapon(playerid, 46, 99999);
	GivePlayerWeapon(playerid, 44, 99999);
	SendClientMessage(playerid, -3, "Voce usou /kit2");
	return 1;
}
//================================kit 3==========================================================================================
	if(strcmp("/kit3", cmdtext, true, 10) == 0)
    {
	ResetPlayerWeapons(playerid);
	GivePlayerWeapon(playerid, 23, 99999);
    GivePlayerWeapon(playerid, 5, 99999);
    GivePlayerWeapon(playerid, 1, 99999);
    GivePlayerWeapon(playerid, 27, 99999);
    GivePlayerWeapon(playerid, 17, 99999);
    GivePlayerWeapon(playerid, 33, 99999);
    GivePlayerWeapon(playerid, 29, 99999);
    GivePlayerWeapon(playerid, 46, 99999);
    GivePlayerWeapon(playerid, 44, 99999);
    SendClientMessage(playerid, -2, " Voce usou /kit3");
    return 1;
}
//================================sistema de grana==================================================================================
     if(strcmp("/grana", cmdtext, true, 10) == 0)
    {
    GivePlayerMoney(playerid, 700000);
	SendClientMessage(playerid, -1, "Voce recebeu grana por usar /grana");
    return 1;
}
//================================colete==========================================================================================
	if(strcmp("/colete", cmdtext, true, 10) == 0)
	{
	SetPlayerArmour(playerid, 100);
	SendClientMessage(playerid, -1, "Voce recebeu 100 de colete por usar /colete");
	return 1;
}
//================================vida============================================================================================
    if(strcmp("/vida", cmdtext, true, 10) == 0)
	{
	SetPlayerHealth(playerid, 100);
	SendClientMessage(playerid, -1, "Voce recebeu 100 de vida por usar /vida");
	return 1;
}
// =============================== TELEPORTES PRINCIPAL ! É NOIS ! By: Jonathan_Feitosa ===========================================
   if(!strcmp("/teleportes", cmdtext, true))
	{
       ShowPlayerDialog(playerid, JFS_OWNA, DIALOG_STYLE_LIST, "{33CCFF} ---- Teleportes By: Matheus_BLS ---- ", "{FFFF00}Drift\n{33AA33}DM\n{33CCFF}Corrida", "Selecionar", "Cancelar");
	   return 1;
	}

//=======================================DRIFT1=====================================================================================
    if(strcmp(cmdtext,"/drift1",true)==0)
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    new State = GetPlayerState(playerid);
    if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
    {
    GameTextForPlayer(playerid,"",4000,6);
    LinkVehicleToInterior(vehicleid,0);
    SetPlayerInterior(playerid,0);
    return SetVehiclePos(vehicleid,-309.5192,1524.6515,75.3710);
    }
    SetPlayerPos(playerid,-309.5192,1524.6515,75.3710);
    SetPlayerInterior(playerid,0);
return 1;
}
//=============================DRIFT 2===============================================================================================
    if(strcmp(cmdtext,"/drift2",true)==0)
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    new State = GetPlayerState(playerid);
    if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
    {
    GameTextForPlayer(playerid,"",4000,6);
    LinkVehicleToInterior(vehicleid,0);
    SetPlayerInterior(playerid,0);
    return SetVehiclePos(vehicleid,2330.5088,1428.1130,42.8203);
    }
    SetPlayerPos(playerid,2330.5088,1428.1130,42.8203);
    SetPlayerInterior(playerid,0);
return 1;
}
//===========================kill=====================================================================================================
   if (strcmp(cmdtext, "/kill", true)==0)
    {
        SendClientMessage(playerid,0x0000FFAA,"Você se matou!"); // MENSAGEM
		SetPlayerHealth(playerid, 0); // DANDO SANGUE 0 !
        return 1;
    }
// =========================== Créditos ==============================
   if (strcmp("/creditos", cmdtext, true, 10) == 0)
    {
      new creditos[300];
      strins(creditos,"{7491F6}Contato-MSN:Matheus1998_ct@hotmail.com\n",strlen(creditos));
      strins(creditos,"{7491F6}Criado Por : Matheus_BLS \n",strlen(creditos)); //MENSAGEM
      strins(creditos,"Obrigado Pedro_BLS por me fazer ser gay e começar aprender pawno\n",strlen(creditos));
      ShowPlayerDialog(playerid,8439, DIALOG_STYLE_MSGBOX, "{F60000} -----------  Créditos  ----------- ",creditos, "Fechar", ""); // 1 BOTAO APENAR
      return 1;
     }
	//=========================Ajuda================================================
   if(strcmp(cmdtext,"/ajuda",true)==0)
	{
       new ajuda[1000]; //
       strins(ajuda,"\n",strlen(ajuda));
       strins(ajuda,"{7491F6}/admins /creditos /teleportes /kill /grana /admins\n",strlen(ajuda));
       strins(ajuda,"{7491F6}Para Administradores : /grana /admins\n",strlen(ajuda));
       ShowPlayerDialog(playerid,8439, DIALOG_STYLE_MSGBOX, "{F60000} -----------------  Ajuda  --------------- ",ajuda, "Fechar", "");
	   return 1;
	}
   return SendClientMessage(playerid, 0xAA3333AA, "BLS-[DRIFT/DM]Comando Desconhecido Pelo Servidor");
  }

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	SendClientMessage(playerid, -1, "Voce entrou em um veiculo dirija com cuidado");
	GameTextForPlayer(playerid, "~y~Voce ~g~entrou em um veiculo", 2000,3);
	return 1;
}
eu nao sei oque acondeceu foi depois que eu tentei coloca um FS sistema de adm mais nao funcionava eu tirei e ficou o erro
Math3us is offline   Reply With Quote
Old 17/07/2012, 03:15 PM   #2
MatheusAlcapone
Gangsta
 
MatheusAlcapone's Avatar
 
Join Date: Dec 2011
Location: Brasil
Posts: 831
Reputation: 19
Default AW: meus comandos parou de funcionar

Todos esses paro de funcionar?
E arrume essa endentação ta horrível
__________________
MatheusAlcapone is offline   Reply With Quote
Old 17/07/2012, 03:19 PM   #3
Math3us
Huge Clucker
 
Math3us's Avatar
 
Join Date: Jul 2012
Location: Cid.Tiradentes-SP
Posts: 487
Reputation: 25
Default Re: meus comandos parou de funcionar

sim foi todos que parou de funcionar to recomeçando a fazer tudo
Math3us is offline   Reply With Quote
Old 17/07/2012, 03:21 PM   #4
MatheusAlcapone
Gangsta
 
MatheusAlcapone's Avatar
 
Join Date: Dec 2011
Location: Brasil
Posts: 831
Reputation: 19
Default AW: meus comandos parou de funcionar

O que acontece quando escreve eles?
__________________
MatheusAlcapone is offline   Reply With Quote
Old 17/07/2012, 03:29 PM   #5
Math3us
Huge Clucker
 
Math3us's Avatar
 
Join Date: Jul 2012
Location: Cid.Tiradentes-SP
Posts: 487
Reputation: 25
Default Re: meus comandos parou de funcionar

fala que o cmd nao existe exclui ele to começando de novo
Math3us is offline   Reply With Quote
Old 17/07/2012, 03:32 PM   #6
[NWD]Jim._.Carrey
Gangsta
 
[NWD]Jim._.Carrey's Avatar
 
Join Date: Sep 2010
Posts: 722
Reputation: 35
Default Re: meus comandos parou de funcionar

O comando que está causando isso é o /admins basta arruma-ló.
__________________

NWD Games
IP: rpg.nwdgames.com:6666
[NWD]Jim._.Carrey is offline   Reply With Quote
Old 17/07/2012, 03:39 PM   #7
MatheusAlcapone
Gangsta
 
MatheusAlcapone's Avatar
 
Join Date: Dec 2011
Location: Brasil
Posts: 831
Reputation: 19
Default AW: meus comandos parou de funcionar

Jim esta certo, eu nem tinha percebido antes. Você fecho duas chaves sem precisar.

pawn Code:
if(strcmp(cmdtext, "/admins", true) == 0)
{
    new Jogador[24];
    new count5;
    new msg[120];
    for(new i=0; i<MAX_PLAYERS; i++){
    if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
    GetPlayerName(i,Jogador,24);
    format(msg,sizeof(msg),"Admins Online: %s", Jogador);
    SendClientMessage(playerid, 0xFFFFFFAA, msg);
    count5++;
    if(count5 == 0)
    {
        SendClientMessage(playerid, 0xFFFFFFAA, "Nenhum Admin Online No Momento Aguarde.");
    }
   return 1;
}
__________________
MatheusAlcapone is offline   Reply With Quote
Old 17/07/2012, 03:46 PM   #8
Math3us
Huge Clucker
 
Math3us's Avatar
 
Join Date: Jul 2012
Location: Cid.Tiradentes-SP
Posts: 487
Reputation: 25
Default Re: AW: meus comandos parou de funcionar

Quote:
Originally Posted by matheus_alcapone View Post
Jim esta certo, eu nem tinha percebido antes. Você fecho duas chaves sem precisar.

pawn Code:
if(strcmp(cmdtext, "/admins", true) == 0)
{
    new Jogador[24];
    new count5;
    new msg[120];
    for(new i=0; i<MAX_PLAYERS; i++){
    if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
    GetPlayerName(i,Jogador,24);
    format(msg,sizeof(msg),"Admins Online: %s", Jogador);
    SendClientMessage(playerid, 0xFFFFFFAA, msg);
    count5++;
    if(count5 == 0)
    {
        SendClientMessage(playerid, 0xFFFFFFAA, "Nenhum Admin Online No Momento Aguarde.");
    }
   return 1;
}
eu coloquei esse ai que voce mandou deu 26 erros lol

eu refiz tudo tinha feito pouca coisa tiinha era mais feito mapa ja coloquei vlw
Math3us is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Pawn Compiler Library parou de funcionar Shum493 Português/Portuguese 22 11/01/2013 04:13 PM
[Ajuda]Pawn Compile Library parou de funcionar Triweekly Português/Portuguese 3 13/05/2012 11:37 PM
[AJUDA] Zaramoth Parou de Funcionar :/ davidjnio Português/Portuguese 11 23/09/2011 01:43 PM
[Ajuda]Como meter carros a venda com os meus comandos RicardoMoreira Português/Portuguese 8 06/12/2010 10:27 PM
Ajuda Urgente, um FS desabilitou meus Comandos Comando_DS Português/Portuguese 6 01/03/2010 03:04 PM


All times are GMT. The time now is 06:04 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.