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

PHP код:
SetPlayerPos(playeridPizzaCP[rand][0], PizzaCP[rand][1], PizzaCP[rand][2]);
SetPlayerFacingAngle(playeridPizzaCP[rand][3]); 
If this doesn't work post the code where you store random spawns.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)