10.07.2011, 22:43
pawn Код:
command(freeze, playerid, params[])
{
if( PlayerInfo[playerid][Admin] >= 1)
{
new admin;
new fplayer;
new fplayerid;
new string[100];
if(sscanf(params, "u", fplayerid)) return SendClientMessage(playerid, COLOUR_WHITE, "Hint: /freeze [playerid]");
if(!IsPlayerConnected(fplayerid)) return SendClientMessage(playerid, COLOUR_WHITE, "That player is not connected.");
GetPlayerName(playerid, admin, 25);
GetPlayerName(fplayerid, fplayer, 25);
TogglePlayerControllable(fplayer,1);// New Error line
format(string, sizeof(string),"**You have frozen %s!**",fplayer);
SendClientMessage(playerid, COLOUR_TAN,string);
format(string, sizeof(string),"You have been frozen by Admin %s",admin);
SendClientMessage(playerid, COLOUR_WHITE,string);
}
return 1;
}
pawn Код:
error 035: argument type mismatch (argument 2)