17.03.2011, 17:22
No, because that'll obtain EVERY character of the string and try convert it in to an integer.
You defined 'name' as an integer, when it's a string.
You defined 'name' as an integer, when it's a string.
pawn Код:
CMD:createorg(playerid, params[])
{
new str[59],id,wep1,wep2,wep3,name[24];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFAA, "SERVER: Unknown command.");
if(sscanf(params,"uddds[24]",id,wep1,wep2,wep3,name))return SendClientMessage(playerid,0xFF9900AA, "USAGE: /createorg [leader] [wep1] [wep2] [wep3] [name]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF, "That user is not connected.");
GivePlayerWeapon(id,wep1,5000);
GivePlayerWeapon(id,wep2,5000);
GivePlayerWeapon(id,wep3,5000);
format(str, sizeof(str),"An Admin has set you leader of %s!",name);
SendClientMessage(playerid,0xFF9900AA,str);
return 1;
}