Call Reserved Car Script Help
#1

Well, I wanted to make a script to where when you typed the command /rcar, it would bring your car that's reserved to you on the server to where you are, but I'm not having much luck. Any ideas?
Reply
#2

Bump?
Reply
#3

Something like this:

pawn Код:
CMD:bringcar(playerid, params[])
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
   
    for(new i; i <MAX_VEHICLES; i++);
    {
        if(strmatch(gVehicleData[i][E_OWNER], ReturnPlayerName(playerid))
        {
            SetVehiclePos(playerid, X+random(3), Y+random(3), Z+5);
        }
        else return SendClientMessage(playerid, 0xFFFFFFFF, "You dont have any cars!");
    }
    return 1;
}

stock strmatch(const String1[], const String2[])
{
    if ((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1))) {
        return true;
    }
    else {
        return false;
    }
}
Untested though you need to change the variable to your vehicle system variable settings..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)