20.09.2009, 14:37
first of all we need a 2d array to store a string for each player
and than we store the text with the function format in ScooterCylinder
and /checkcylinder need to look something like that
pawn Код:
new ScooterCylinder[MAX_PLAYERS][MAX_PLAYER_NAME];
pawn Код:
dcmd_cylinder(playerid, params[])
if(params[0] == EOS || strlen(params) >= sizeof(ScooterCylinder[]))
return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/cylinder <cylinder name>\"");
else return format(ScooterCylinder[playerid], sizeof(ScooterCylinder[]), params);
pawn Код:
dcmd_checkcylinder(playerid, params[])
{
//some checks to get the playerid which was typed in (I call it now pid)
new string[128];
GetPlayerName(pid, string, MAX_PLAYER_NAME);
format(string, sizeof(string), "Player: %s's Cylinder is: %s..", string, ScooterCylinder[pid]);
return SendClientMessage(playerid, 0xFFFFFFAA, string);
}