Command Help!
#1

i use stevo's gamemode and i added a command but when i try it it say unknown command

Код:
dcmd_gunpack(playerid,params[])
{
    #pragma unused params
    if(IsRegularPlayer[playerid] != 1337)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You must be a regular player to use GunPack.");
	    return 1;
	}
	if(IsRegularPlayer[playerid] == 1337)
	{
        GivePlayerWeapon(playerid, 26, 1000);
        return 1;
    }
    return 1;
}
Reply
#2

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

when i compile it , it got no problem but when i enter the server it got the same , so i looked under onplayercommandtext i found commands and i edited one of them to
Quote:

dcmd(gunpack,8,cmdtext);

but it still not working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)