lil help
#7

Quote:
Originally Posted by Medal Of Honor team
Посмотреть сообщение
pawn Код:
id = strval(params)
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.

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;
}
Reply


Messages In This Thread
createorg help - by tanush - 17.03.2011, 16:35
Re: lil help - by Jochemd - 17.03.2011, 16:41
Re: lil help - by tanush - 17.03.2011, 16:46
Re: lil help - by -Rebel Son- - 17.03.2011, 16:47
Re: lil help - by tanush - 17.03.2011, 16:57
Re: lil help - by Medal Of Honor team - 17.03.2011, 17:21
Re: lil help - by Calgon - 17.03.2011, 17:22
Re: lil help - by tanush - 17.03.2011, 17:25
Re: lil help - by Calgon - 17.03.2011, 17:26
Re: lil help - by tanush - 17.03.2011, 17:27

Forum Jump:


Users browsing this thread: 2 Guest(s)