29.12.2009, 22:40
So I was making a SAMP Admin Script I need to know how to make a ban command dcmd_ban i have everything i need but this error shows up this is the code
dcmd_akill(playerid, params[])
{
new giveplayerid = ReturnUser(tmp, playerid);
if(gPlayerInfo[playerid][PLAYER_LEVEL] < gCommands[AKILL])
{
new string[100];
format(string, sizeof(string), "You must be administrator level %d to use that command!", gCommands[AKILL]);
return SendClientMessage(playerid, COLOUR_ORANGE, string);
}
else if(!strlen(params))
return SendClientMessage(playerid, COLOUR_ORANGE, "USAGE: /akill [id | name]");
else
{
if(IsPlayerConnected(giveplayerid))
{
SetPlayerHealth(giveplayerid, 0.0);
new string[150];
format(string, sizeof(string), "You have been admin-killed by administrator \'%s\'.", gPlayerInfo[playerid][PLAYER_NAME]);
SendClientMessage(giveplayerid, COLOUR_ORANGE, string);
format(string, sizeof(string), "You have successfully admin-killed player \'%s\'.", gPlayerInfo[giveplayerid][PLAYER_NAME]);
return SendClientMessage(playerid, COLOUR_LIGHTBLUE, string);
}
else
return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You can not admin-kill yourself or a disconnected player.");
}
}
the error is
C:\Users\Welcome\Desktop\samp03asvr_R3_win32\pawno \AdminScript.pwn(290) : error 017: undefined symbol "ReturnUser"
i just wanna know how to make a GivePlayerID like the player you are gonna kill plz thanks
dcmd_akill(playerid, params[])
{
new giveplayerid = ReturnUser(tmp, playerid);
if(gPlayerInfo[playerid][PLAYER_LEVEL] < gCommands[AKILL])
{
new string[100];
format(string, sizeof(string), "You must be administrator level %d to use that command!", gCommands[AKILL]);
return SendClientMessage(playerid, COLOUR_ORANGE, string);
}
else if(!strlen(params))
return SendClientMessage(playerid, COLOUR_ORANGE, "USAGE: /akill [id | name]");
else
{
if(IsPlayerConnected(giveplayerid))
{
SetPlayerHealth(giveplayerid, 0.0);
new string[150];
format(string, sizeof(string), "You have been admin-killed by administrator \'%s\'.", gPlayerInfo[playerid][PLAYER_NAME]);
SendClientMessage(giveplayerid, COLOUR_ORANGE, string);
format(string, sizeof(string), "You have successfully admin-killed player \'%s\'.", gPlayerInfo[giveplayerid][PLAYER_NAME]);
return SendClientMessage(playerid, COLOUR_LIGHTBLUE, string);
}
else
return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You can not admin-kill yourself or a disconnected player.");
}
}
the error is
C:\Users\Welcome\Desktop\samp03asvr_R3_win32\pawno \AdminScript.pwn(290) : error 017: undefined symbol "ReturnUser"
i just wanna know how to make a GivePlayerID like the player you are gonna kill plz thanks