Command Help!
#3

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Try
pawn Код:
dcmd_gunpack(playerid,params[])
{
    #pragma unused params
    if(IsRegularPlayer[playerid] != 1337) return SendClientMessage(playerid,COLOR_ERROR,"You must be a regular player to use GunPack.");

    GivePlayerWeapon(playerid, 26, 1000);
    return true;
}
you can even return GivePlayerWeapon or an other number than zero
PHP код:
dcmd_gunpack(playerid,params[])
{
#pragma unused params
if(IsRegularPlayer[playerid] != 1337) return SendClientMessage(playerid,COLOR_ERROR,"You must be a regular player to use GunPack.");
return 
GivePlayerWeapon(playerid261000);

because OnPlayerCommandText are not interesting of returning other numbers than zero
but you can't return floats or strings

Reply


Messages In This Thread
Command Help! - by nor15 - 25.01.2013, 19:54
Re: Command Help! - by ViniBorn - 25.01.2013, 20:05
Re: Command Help! - by IPrototypeI - 25.01.2013, 20:08
Re: Command Help! - by nor15 - 25.01.2013, 20:43

Forum Jump:


Users browsing this thread: 1 Guest(s)