20.01.2011, 14:54
Use sscanf and zcmd
Command created with zcmd n sscanf:
Command created with zcmd n sscanf:
pawn Код:
command(invite, playerid, params[])
{
new ID, string[128];
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, white,"You need an admin to use this command.");
if(sscanf(params, "ud", ID, jobid)) return SendClientMessage(playerid, white, "Benutze: /invite [ID] [JobID]");
if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, white, "Ungьwhite SpielerID");
beruf[ID] = jobid;
format(string,sizeof(string),"Der neue Job von %s ist %s",SetPlayerName(ID),berufe[jobid]);
SendClientMessage(playerid, white,string);
format(string,sizeof(string),"Dein neuer Job ist %s",berufe[jobid]);
SendClientMessage(ID, white,string);
return 1;
}