Posts: 112
Threads: 8
Joined: Jan 2013
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(playerid, 26, 1000);
}
because OnPlayerCommandText are not interesting of returning other numbers than zero
but you can't return floats or strings