private cars help [again]
#1

Hello i need help i got these vehicles that i want to make as a private car but only the vcar[0] works and i need help to make all of them private vehicles btw i get no errors



Код:
new vcar_names[MAX_PLAYER_NAME][25];
new vcar[25];
Code:
vcar[0] = CreateVehicle(522,1720.0730,-1375.3379,13.1083,181.5079,003,003,120);//=========== only this car works?? wtf
	vcar_names[0] = "[XL]KAOS";
	vcar[1]= CreateVehicle(522,1709.4747,-1374.4828,13.1197,179.8992,003,003,120);
	vcar_names[1] = "[XL]KAOS";
	vcar[2] = CreateVehicle(467,1718.7620,-1389.4410,13.1228,180.0620,003,003,120);
	vcar_names[2] = "[XL]TOTE]";
    vcar[3] = CreateVehicle(560,1719.7148,-1357.4083,13.0962,180.8813,003,003,120);
	vcar_names[3] = "[XL]KAOS";
	vcar[4] = CreateVehicle(579,1710.1401,-1355.4110,13.3919,176.2906,003,003,120);
	vcar_names[4] = "[XL]KAOS";
Code:
//=====================vipcars=========================


public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid =GetPlayerVehicleID(playerid);
    new pname[MAX_PLAYER_NAME];


    GetPlayerName(playerid, pname, sizeof pname);
    if (newstate == PLAYER_STATE_DRIVER)
    {
         if (vehicleid == vcar[0])
         {
              if(strcmp(pname, vcar_names[0], true) == 0)

              {
                  SendClientMessage(playerid, COLOR_RED, "WELCOME VIP");
                  return 1;
              }
              else

              {
                  RemovePlayerFromVehicle(playerid);
                  SendClientMessage(playerid, COLOR_RED, "THIS VEHICLE DOES NOT BELONG TO YOU");
              }
         }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)