SA-MP Forums Archive
Unknow CMD - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Unknow CMD (/showthread.php?tid=554166)



Unknow CMD - sas10 - 02.01.2015

hello
i get unknow cmd why ?
PHP код:
CMD:robpizzaplayeridparams[ ] )
{
        if ( 
pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
        if ( !
IsPlayerInDynamicCPplayeridcp_Pizza) ) return SendClientMessageplayeridRED"ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
        if ( 
pizzaRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Idlewood Pizza has been robbed recently, please wait patiently!" );
        
robTimerPplayerid ] = SetTimerEx"robPizza"30000false"i"playerid );
        
SendClientMessageplayeridINFO"[ROBBERY INFO] You have started a robbery, it will last 30 seconds. Do not leave the checkpoint!" );
        
pRobbingPplayerid ] = true;
        
pizzaRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery at Idlewood Pizza!"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +2);
        return 
true;




Re: Unknow CMD - Mic_H - 02.01.2015

PHP код:
#define RED -1
#define ROB -1
#define INFO -1
new pRobbingP[MAX_PLAYERS];
new 
pizzaRobbed;
new 
robTimerP[MAX_PLAYERS];
new 
cp_Pizza;
CMD:robpizzaplayeridparams[ ] )
{
        if ( 
pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
        
//if ( !IsPlayerInDynamicCP( playerid, cp_Pizza) ) return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
        
if ( pizzaRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Idlewood Pizza has been robbed recently, please wait patiently!" );
        
robTimerPplayerid ] = SetTimerEx"robPizza"30000false"i"playerid );
        
SendClientMessageplayeridINFO"[ROBBERY INFO] You have started a robbery, it will last 30 seconds. Do not leave the checkpoint!" );
        
pRobbingPplayerid ] = true;
        
pizzaRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery at Idlewood Pizza!"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +2);
        return 
true;

This is ma debug script and it works fine..
Check if you have placed all the required plugins. streamer etc


Re: Unknow CMD - sas10 - 02.01.2015

after adding
Quote:

D:\da\filterscripts\bankrobbery.pwn(20) : error 021: symbol already defined: "robTimerP"
D:\da\filterscripts\bankrobbery.pwn(23) : error 021: symbol already defined: "pizzaRobbed"

line 20
Quote:

robTimerP[ MAX_PLAYERS ],

line 23
Quote:

bool: pRobbingP[ MAX_PLAYERS ],




Re: Unknow CMD - Arxalan - 02.01.2015

did u already include that two lines if yes then remove any one of these 2


Re: Unknow CMD - sas10 - 02.01.2015

ok now i have error again wtf
Quote:

warning 204: symbol is assigned a value that is never used: "cp_Pizza"

this the line error
Quote:

cp_Pizza = CreateDynamicCP(-23.4826,-55.6319,1003.5469, 2.0, .interiorid = -1);