lil help with strcmp
#1

Well it sends the message saying that vehicle is owned by...
but it doesnt remove the player from the vehicle, why?
pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new string[128];
    format(string,sizeof(string),"%s",Carowner);
    if(strcmp(GetPName(playerid),Carowner) == -1)
    {
        RemovePlayerFromVehicle(playerid);
        SendFMessage(playerid,red,"[Private Car]"lgreen"That vehicle is owned by "lyellow"%s"lgreen"!",Carowner);
    }
    return 1;
}
Reply
#2

RemovePlayerFromVehicle only works when the vehicle isn't moving.

Use something like this instead:

pawn Code:
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X+2, Y, Z);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)