15.03.2018, 15:30
In game when player connect work i can kill me cant kill id 1 he is not in game but when i try to kill heal or kick me i
dont get nothing command not working help
dont get nothing command not working help
pawn Code:
CMD:heal(playerid,params[])
{
new targetid;
{
if(IsPlayerAdmin(playerid) == 0)
{
SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Nije vam dozvoljeno koriscenje ove komande!!");
}
else if(IsPlayerAdmin(playerid) == 1)
{
if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Koristi /heal [ID]");
{
if(!IsPlayerConnected(targetid))
{
SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Igrac nije na serveru!");
}
else if(!IsPlayerConnected(targetid))
{
SetPlayerHealth(playerid,100);
}
}
}
}
return 1;
}
CMD:kill(playerid,params[])
{
new targetid;
new name[MAX_PLAYER_NAME];
{
if(IsPlayerAdmin(playerid) == 0)
{
SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Nije vam dozvoljeno koriscenje ove komande!!");
}
else if(IsPlayerAdmin(playerid) == 1)
{
if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Koristi /kill [ID]");
{
if(!IsPlayerConnected(targetid))
{
SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Igrac nije na serveru!");
}
else if(!IsPlayerConnected(targetid))
{
SetPlayerHealth(playerid,0);
new string[64];
format(string,sizeof(string), ""CRVENA"[BD:RP]"BELA"Ubili ste igraca %s!");
SendClientMessage(playerid,-1,string);
format(string,sizeof(string), ""CRVENA"[BD:RP"BELA"Admin %s vas je ubio!",name);
SendClientMessage(playerid,-1,string);
}
}
}
}
return 1;
}
CMD:kick(playerid,params[])
{
new targetid;
{
if(IsPlayerAdmin(playerid) == 0)
{
SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Nije vam dozvoljeno koriscenje ove komande!!");
}
else if(IsPlayerAdmin(playerid)== 1)
{
if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Koristi /kick [ID] [RAZLOG]");
{
if(IsPlayerAdmin(targetid))
{
SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Trazeni igrac je clan AT!");
}
if(!IsPlayerConnected(targetid))
{
SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Igrac nije na serveru!");
}
else if(!IsPlayerConnected(targetid))
{
Kick(playerid);
}
}
}
}
return 1;
}
CMD:specon(playerid,params[])
{
new targetid;
{
if(IsPlayerAdmin(playerid) == 0)
{
SendClientMessage(playerid, -1,""CRVENA"[BD:RP]"BELA"Nije vam dozvoljeno koriscenje ove komande!");
}
else if(IsPlayerAdmin(playerid) == 1)
{
if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Koristi /specon [ID]");
{
if(IsPlayerAdmin(targetid))
{
SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Trazeni igrac je clan AT!");
}
if(!IsPlayerConnected(targetid))
{
SendClientMessage(playerid,-1,""CRVENA"[BD:RP]"BELA"Igrac nije na serveru!");
}
else if(!IsPlayerConnected(targetid))
{
TogglePlayerSpectating(playerid, 1);
}
}
}
}
return 1;
}