SA-MP Forums Archive
Just Help This Time GIve Code - 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: Just Help This Time GIve Code (/showthread.php?tid=180194)



Just Help This Time GIve Code - [MKD]Max - 30.09.2010

Hey Guys I Want To Tell You Please I Want To Make My Own Admin Script The inc file is done i got my own inc now i want to make full admin script with the commands please when i go like this


dcmd_akill(playerid, params[])
{
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
{
new id = (isNumeric(params)) ? strval(params) : GetPlayerId(params);
if(IsPlayerConnected(id) && id != playerid)
{
SetPlayerHealth(id, 0.0);
new string[128];
format(string, sizeof(string), "You have been admin-killed by administrator \'%s\'.", gPlayerInfo[playerid][PLAYER_NAME]);
SendClientMessage(id, COLOUR_ORANGE, string);
format(string, sizeof(string), "You have successfully admin-killed player \'%s\'.", gPlayerInfo[id][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.");
}
}



how i can know what the string for all commands like this
"new string[100]; " <-------- thats what i want to know thanks if youi help me guys