new easy; //létrehoztuk a változót
public OnGameModeInit() // hez
easy = AddStaticVehicle(411,3784.9668,2065.0129,99.2751,354.8349,79,79); //az adD static vehiclét cseréld a te kocsid-ra
if(newstate == PLAYER_STATE_DRIVER){ new Vehicle = GetPlayerVehicleID(playerid); if(Vehicle == easy){ if(strcmp(PlayerName,\"Jóska\",true)) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, 0x33AA33AA, \"Ez a jármû Jóska tulajdona!\"); } } }
if(newstate == PLAYER_STATE_DRIVER){ new Vehicle = GetPlayerVehicleModel(playerid); if(Vehicle == JÁRMÛID){ if(strcmp(PlayerName,\"Jóska\",true)) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, 0x33AA33AA, \"Ez a jármû Jóska tulajdona!\"); } } }
OnGameModeInit()
new JoskaInfernusa;public OnGameModeInit(){ JoskaInfernusa = CreateVehicle(411, 1954.3135, 1369.5538, 8.9877, 351.8879, 64, 1, 60); return 1;}public OnPlayerStateChange(playerid, newstate, oldstate){ if(newstate == PLAYER_STATE_DRIVER) { if(IsPlayerInVehicle(playerid, JoskaInfernusa)){ if(strfind(PlayerName(playerid), \"Joska\", true) != -1) { RemovePlayerFromVehicle(playerid);SendClientMessage(playerid, 0x33AA33AA, \"Ezt az Infernust csak Jóska használhatja!\"); }} } return 1;}stock PlayerName(playerid){new name[MAX_PLAYER_NAME];GetPlayerName(playerid, name, MAX_PLAYER_NAME);return name;}