Command Ain't working
#1

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.
Reply
#2

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

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

Repped+
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)