commands problem
#1

i find /cancelhit command so i want player can /cancelhit on 60 sec and after player can't cancelhit can u fix my command


Код:
if(strcmp(cmd, "/cancelhit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] ==
{
if(GoChase[playerid] < 999)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(hitid, giveplayer, sizeof(giveplayer));
format(string,sizeof string,"Hitman %s has canceled %s(ID:%d) contract.", sendername , giveplayer, hitid);
SendFamilyMessage(8, COLOR_YELLOW, string);
GetChased[playerid] = 999;
GoChase[playerid] = 999;
GotHit[playerid] = 0;
hitid = 999;
hitfound = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not a Hitman!");
}
}
return 1;
}
Reply
#2

1. Name your variables properly. What the hell is GetChased? What the hell is GoChase? What the hell is GotHit?

2. Why are you using if(IsPlayerConnected(playerid)) in a command? Players that aren't connected can't type commands, strangely enough.

3. if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] ==
You're missing a value from the end of that.
Reply
#3

bro i dont know and i find on samp and i need /cancelhit command can u make it for me and check this thread i already post


https://sampforum.blast.hk/showthread.php?tid=337092
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)