SA-MP Forums Archive
Command dont work properly - 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: Command dont work properly (/showthread.php?tid=651191)



Command dont work properly - Dejan12345 - 15.03.2018

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
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;
}



Re: Command dont work properly - Maximun - 15.03.2018

@Dejan, Be clearly please in order we be able to help you. Personally, I didn't even understand what do you want say