[AJUDA]Comando
#2

Acho que funciona:

PHP код:
public OnPlayerConnect(playerid)
{
    
CDT[playerid] = -1;
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmdtext,"/tapete"true) == 0
    {
        new 
aname[MAX_PLAYER_NAME];
        
GetPlayerName(playeridanameMAX_PLAYER_NAME);
        
format(filesizeof(file), PASTA_CONTASaname);
        if(
dini_Int(file"Profissao") == Policia_Civil || dini_Int(file"Profissao") == Policia_Federal || dini_Int(file"Profissao") == Interpol || dini_Int(file"Profissao") == Delegado || dini_Int(file"Profissao") == Bope || dini_Int(file"Profissao") == Swat || dini_Int(file"Profissao") == Narcoticos || dini_Int(file"Profissao") == Policia_Militar || dini_Int(file"Profissao") == FBI || dini_Int(file"Profissao") == Policia_Rodoviaria || dini_Int(file"aAdmin") == 1)
        {
            if(
Tapete >= 10) return SendClientMessage(playerid0xFF0000FF"Sу podem ser criados 10 tapetes ao mesmo tempo.");
            if(
CDT[playerid] == -1)
            {
                
Tapete++;
                
GetPlayerPos(playerid,xx,yy,zz);
                
GetPlayerFacingAngle(playeridB);
                
CDT[playerid] = CreateObject(2899xxyyzz-0.900,B-90300.0);
                
GameTextForPlayer(playerid,"~w~Tapete criado :)",6000,1);
                
SetTimerEx("DestruirObjeto",600000,false,"d",Tapete);
                return 
1;
            }
            else
            {
                
Tapete--;
                
DestroyObject(CDT[playerid]);
                
CDT[playerid] = -1;
                
GameTextForPlayer(playerid,"~w~Tapete Deletado",6000,1);
                return 
1;
            }
        } 
        else { 
SendClientMessage(playerid,Vermelho,"(ERRO) Vocк nгo й um Policial!"); }
        return 
1;
    }
    return 
0;

Reply


Messages In This Thread
[AJUDA]Comando - by Fireblad - 08.07.2011, 01:25
Re: [AJUDA]Comando - by Shadoww5 - 08.07.2011, 02:23

Forum Jump:


Users browsing this thread: 1 Guest(s)