SA-MP Forums Archive
/agn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /agn (/showthread.php?tid=391375)



/agn - Akcent_Voltaj - 10.11.2012

i made a cmd so if i type /agn no one can tp at me

PHP код:
if(strcmp(cmd"/agn"true) == 0)
                    {
                    if(
IsPlayerConnected(playerid))
                    {
                    if(
IsPlayerAdmin(playerid))
                    {
                    if(!
AdminTp[playerid])
                    {
                        
SendClientMessage(playeridCOLOR_ORANGE"   Nu se poate teleporta nimeni la tine !");
                        
AdminTp[playerid] = 1;
                    }
                    else if(
AdminTp[playerid])
                    {
                        
AdminTp[playerid] = 0;
                        
SendClientMessage(playeridCOLOR_RED"   Acuma se poate teleporta admini la tine !");
                        
                    }
                    }
                    }
                    return 
1;
                    } 
PHP код:
if(AdminTp[giveplayerid] > 0)
                    {
                        
SendClientMessage(playeridCOLOR_RED"   Ne te poti teleporta la acest owner !");
                        return 
1;
                    }