SA-MP Forums Archive
[Ajuda] capacete parece sу pra um player ajuda - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] capacete parece sу pra um player ajuda (/showthread.php?tid=509109)



capacete parece sу pra um player ajuda - rogerioexper - 25.04.2014

QUERO QUE TODOS PLAYERS USE O CAPACETE MAIS SУ UMA PODE USAR

PHP код:
    if(strcmp(cmd"/capacete"true) == 0)
    {
       if(
IsPlayerInAnyVehicle(playerid))
       {
               if(
CapacetePlayer[playerid] == 0)
               {
                   
CapacetePlayer[playerid] = 1;
                   
GetPlayerName(playeridsendernamesizeof(sendername));
                   
SendClientMessage(playeridCOLOR_YELLOW,"[BLP] Vocк colocou o Capacete, Agora Esta Protegido (/tirarcapacete)");
                   
format(stringsizeof(string), "%s Coloca seu Capacete!."sendername);
                   
ProxDetector(10.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                   
SetPlayerAttachedObject playerid18645 0.07 88 75 ) ;
               }
               else
               {
                  
SendClientMessage(playeridCOLOR_GREY,"Vocк jб estб de Capacete");
               }
           }
       else
       {
           
SendClientMessage(playeridCOLOR_GREY," Vocк nгo estб em um Veнculo ");
       }
       return 
1;
    }
    if(!
strcmp(cmdtext"/tirarcapacete"true))
    {
        if(
CapacetePlayer[playerid] == 1)
        {
            
CapacetePlayer[playerid] = 0;
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
SendClientMessage(playeridCOLOR_YELLOW,"[BLP] Vocк estб sem Capacete, Use: (/capacete)");
            
format(stringsizeof(string), "%s Tira seu Capacete!."sendername);
            
ProxDetector(10.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RemovePlayerAttachedObject(playerid1);
        }
           else
        {
            
SendClientMessage(playeridCOLOR_YELLOW,"[BLP] Vocк jб estб sem Capacete!");
        }
        return 
1;
    }