SA-MP Forums Archive
Command Ain't working - 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: Command Ain't working (/showthread.php?tid=350631)



Command Ain't working - Black Axe - 13.06.2012

Well.. I've made this CMD :

PHP код:
        if(strcmp(cmd"/throwtrash"true) == 0)
        {
                new 
string[256];
                new 
name[MAX_PLAYER_NAME];
                
GetPlayerName(playeridnamesizeof(name));
        for(new 
0sizeof(Trashmaster); i++)
                {
                        if(
PlayerInfo[playerid][HoldingObject] == 1)
                        {
                     new 
Float:tmxFloat:tmyFloat:tmz;
                         
GetVehiclePos(Trashmaster[i], tmxtmytmz);
                         if(
IsPlayerInRangeOfPoint(playerid1.5tmxtmytmz))
                         {
                                
format(stringsizeof(string), " %s reaches into the dumpster and takes the trash bag"name);
                                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            
RemovePlayerAttachedObject(playerid0);
                                
PlayerInfo[playerid][HoldingObject] = 0;
                            }
                        }
                }
                return 
1;
        } 
But.. When i go near the Truck and Type it nothing happen.. It never works anywhere tho.


Re: Command Ain't working - PrawkC - 13.06.2012

Increase the radius for the IsPlayerInRangeOfPoint, put it at like 10 and then test it again.


Re: Command Ain't working - Black Axe - 13.06.2012

God.. You are right xD - Thanks very much.

Repped+