30.07.2012, 11:51
Hello can anyone script command /god for me? and /agate(admin gate)That opens gate u are near, for admins only.And if you could u can scriptnational guard factio.thanks.And also /fixveh it would fix car.
#include a_samp
#include zcmd
new GodMode[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
GodMode[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
GodMode[playerid] = 0;
return 1;
}
CMD:god(playerid, params[])
{
if(GodMode[playerid] == 0)
{
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid, 99999);
GodMode[playerid] = 1;
}
else if(GodMode[playerid] == 1)
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GodMode[playerid] = 0;
}
return 1;
}
CMD:god(playerid, params[])
{
if(GodMode[playerid] == 0)
{
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid, 99999);
GodMode[playerid] = 1; // its shout be like that becose after you become "god" and use
//command again you still will be and cant check if you are alredy or not
}
else if(GodMode[playerid] == 1)
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
return 1;
}