after cmd . . . when X(playerid) !
#1

Hi guys.
how can i write when player type cmdtext and when player enter vehicle get player checkpoint.
Reply
#2

pawn Код:
CMD:activate(playerid, params[])
{
     cpVar[playerid] = 1;
     return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
     if(cpVar[playerid] == 1 && vehicleid == cpVehicle)
     {
           SetPlayerCheckpoint(playerid, x, y, z, size);
     }
     return 1;
}
That's an example, not a working code. By setting a variable, and using the onplayerentervehicle callback you can set the CP.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)