91
mIRC/pawn Scripting / My Fatal Error x_X
« on: January 01, 2012, 08:01:37 pm »
I'm disappointed .
I don't know how to fix my problem X_X ...
In script , i think, are all good but.. something is deleted or.. idk
not are problem on cmds... look at "givemoney" cmd:
[pawn]else if (strcmp(cmd, "givemoney", true) == 0) {
if(IsLogged[playerid] == 0) SendClientMessage(playerid,NOTACCES,"Need to login first !");
else if(PlayerInfo[playerid][AdminLevel] < 5) SendClientMessage(playerid,NOTACCES,"Not have permission to use this command!(AdminLevel 5+)");
else if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][AdminLevel] >= 5)
{
new plr, score[256], string[256];
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp), score = strtok(cmdtext, idx);
if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c givemoney [Nick/ID] [Amount]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
format(string,sizeof(string),"Admin %s Give to [ %s ] money [ %d ]",gPlayers[playerid],gPlayers[plr],strval(score));
SendClientMessageToAll(COLOR_GREEN,string);
IncPlayerHandCash(plr,strval(score));
}
}else{
SendClientMessage(playerid,NOTACCES,"***Not have permission to use this command!");
}
return 1;
}[/pawn]
I have all files.
I made a video - http://youtu.be/3bs2g56ANzU
I don't know how to fix my problem X_X ...
In script , i think, are all good but.. something is deleted or.. idk
not are problem on cmds... look at "givemoney" cmd:
[pawn]else if (strcmp(cmd, "givemoney", true) == 0) {
if(IsLogged[playerid] == 0) SendClientMessage(playerid,NOTACCES,"Need to login first !");
else if(PlayerInfo[playerid][AdminLevel] < 5) SendClientMessage(playerid,NOTACCES,"Not have permission to use this command!(AdminLevel 5+)");
else if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][AdminLevel] >= 5)
{
new plr, score[256], string[256];
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp), score = strtok(cmdtext, idx);
if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c givemoney [Nick/ID] [Amount]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
format(string,sizeof(string),"Admin %s Give to [ %s ] money [ %d ]",gPlayers[playerid],gPlayers[plr],strval(score));
SendClientMessageToAll(COLOR_GREEN,string);
IncPlayerHandCash(plr,strval(score));
}
}else{
SendClientMessage(playerid,NOTACCES,"***Not have permission to use this command!");
}
return 1;
}[/pawn]
I have all files.
I made a video - http://youtu.be/3bs2g56ANzU