07.10.2012, 17:26
I get errors when I try to add it, can you add it for me? I know I have to add new admin;, but I get argument type mismatch error, can you just add it for me? Please. I suck xD
This is how i add it and i get argument type mismatch 2, on line: GetPlayerName.
I get the same error when i have your line:
GetPlayerName(playerid, admin, reason);
and this line:
GetPlayerName(playerid, admin, string, reason);
Sorry i am new to scripting
This is how i add it and i get argument type mismatch 2, on line: GetPlayerName.
pawn Code:
COMMAND:kick(playerid, params[])
{
new targetid, admin, reason, string[128], szName[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params, "us[128]", targetid, string)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /kick [playerid] [reason]");
if(IsPlayerConnected(targetid))
{
new szMessage[128], szMessage2[128];
GetPlayerName(playerid, admin, string, reason);
format(szMessage,sizeof szMessage,"AdmCmd: %s, has kicked %s reason: %s",admin, string, reason);
format(szMessage2,sizeof szMessage2,"Admin: %s, has has kicked you, reason: %s",szName, string);
SendAdminMessage(COLOR_YELLOW,szMessage);
SendClientMessage(targetid, COLOR_YELLOW, szMessage2);
Kick(targetid);
return 1;
}
else
return SendClientMessage(playerid, COLOR_RED, "This player is not online."), 1;
}
return 1;
}
}
GetPlayerName(playerid, admin, reason);
and this line:
GetPlayerName(playerid, admin, string, reason);
Sorry i am new to scripting