14.06.2009, 17:14
Okay i got gTeams n stuff.
But with my script if the player is in TEAM_HITMAN and he enters his car it says its for hitmen only and removes player from vehicle.
I have two questions.
How do i stop it from saying its for hitman only IF the player is a hitman?
Script : (Onplayerstatechange)
WHAT I HAVE TRIED :
NORMAL SCRIPT I FOUND:
SECOND QUESTION
How do i make it so it sends a message and doesnt let the player in the vehicle BEFORE he enters it?
Because some people enter the SWAT truck and gain the armour. Which i dont want.
But with my script if the player is in TEAM_HITMAN and he enters his car it says its for hitmen only and removes player from vehicle.
I have two questions.
How do i stop it from saying its for hitman only IF the player is a hitman?
Script : (Onplayerstatechange)
WHAT I HAVE TRIED :
Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { switch (GetVehicleModel(GetPlayerVehicleID(playerid))) { case 409: { if(TEAM_MAYOR == 1) { SendClientMessage(playerid, COLOR_GREEN, "Welcome to you're vehicle."); } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "This is for Mayors only!"); } } } }
Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { switch (GetVehicleModel(GetPlayerVehicleID(playerid))) { case 405: { if(gTeam[playerid] == TEAM_HITMAN) { // GameTextForPlayer(playerid, "~g~You have entered a faction vehicle.", 3000, 3); } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "This is for Hitmen only!"); } } } }
How do i make it so it sends a message and doesnt let the player in the vehicle BEFORE he enters it?
Because some people enter the SWAT truck and gain the armour. Which i dont want.