Extremely agravating. Need help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Extremely agravating. Need help (
/showthread.php?tid=109702)
Extremely agravating. Need help -
TaMeD - 21.11.2009
Ok, well.. I scripted /kick /ban /freeze and /thaw, but whenever i do it on ID 0, it doesn't work. Here's my thaw code:
pawn Код:
if(strcmp(cmd, "/thaw", true) == 0 || strcmp(cmd, "/unfreeze", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ALERT, "** Error: /freeze [id/name]");
if(PlayerInfo[playerid][Admin] >= 2)
{
new player = ReturnUser(tmp);
if(IsPlayerConnected(player))
{
if(player != INVALID_PLAYER_ID)
{
TogglePlayerControllable(player,1);
new giveplayer[MAX_PLAYER_NAME], getplayer[MAX_PLAYER_NAME];
GetPlayerName(playerid,giveplayer,sizeof(giveplayer));
GetPlayerName(player,getplayer,sizeof(getplayer));
format(tmp, sizeof(tmp), "Admin: %s was unfrozen by %s.",getplayer,giveplayer);
SendClientMessageToAll(COLOR_ADMIN, tmp);
new year,month,day;
getdate(year,month,day);
format(tmp, sizeof(tmp), "Admin: %s was unfrozen by %s. [%d/%d/%d]",getplayer,giveplayer,day,month,year);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_ALERT, "** That player is not connected.");
return 1;
}
}
}
return 1;
Some help would be extremely appreciated
Re: Extremely agravating. Need help -
dice7 - 21.11.2009
Does it send one of the error messages or does it do completely nothing ?
Re: Extremely agravating. Need help -
TaMeD - 21.11.2009
Problem resolved, changed to dcmd and sscanf.