Wrong TP
#1

I am trying to make pizza boy job so when someone do /getpizza, they will get random checkpoint marked on minimap, checkpoints are mysql base - a cmd exist to create it...

PHP код:
COMMAND:getpizza(playerid,params[])
{
    if(!
IsPlayerInRangeOfPoint(playerid21979.3885,913.7875,11.0391)) return SendClientMessage(playerid, -1"Error : You are not at stacks.");
    new 
rand random(sizeof(TotalPC));
    
SetPlayerCheckpoint(playeridPizzaCP[rand][piz_x], PizzaCP[rand][piz_y], PizzaCP[rand][piz_z], 10);
    
PizzaBoy[playerid][CarryingPizza] = 1;
    
SendClientMessage(playerid, -1"Pizza Stacks gave you a tray, deliver it to destination.");
    
printf("Pizza CP %i : %f,%f,%f"rand,PizzaCP[rand][piz_x],PizzaCP[rand][piz_y],PizzaCP[rand][piz_z]);
    
SetPlayerPos(playeridPizzaCP[rand][piz_x],PizzaCP[rand][piz_y],PizzaCP[rand][piz_z]);
    new 
Float:x,Float:y,Float:z;
    
GetPlayerPos(playeridxyz);
    return 
1;

I have 2cp inserted, the value of x,y,z showing correct in printf:
PHP код:
printf("Pizza CP %i : %f,%f,%f"rand,PizzaCP[rand][piz_x],PizzaCP[rand][piz_y],PizzaCP[rand][piz_z]); 
But cp is not marking in same pos, out of world boundaries


:/ any fix please?
Reply


Messages In This Thread
Wrong TP - by akib - 31.08.2018, 00:21
Re: Wrong TP - by solstice_ - 31.08.2018, 23:53

Forum Jump:


Users browsing this thread: 1 Guest(s)