07.10.2012, 00:23
(
Последний раз редактировалось thenachoman180; 07.10.2012 в 01:06.
Причина: SOLVED
)
Hello, i am kind of a noob at this stuff as im only 12 years old XD (dont pay me out) ive been coding in pawno for about a year now and ive made a little server for me and my friends. I have a stunter class that just does stunts and i want just that team to be able to do /repair to repair their vehicle, but to do that i need to use 2 if statements
and
But i have absolutely no idea on how to call the second if statement after the first (like to check if a player is in a vehicle after it has checked if they are on the stunter team) this is my public OnPlayerCommandText code.
As you can see i have no idea lol. Please help all you can
-Nacho
Код:
if(gTeam[playerid] == TEAM_STUNTS
Код:
if(!IsPlayerInAnyVehicle(playerid))
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/stunts", cmdtext, true, 10) == 0) { if(gTeam[playerid] == TEAM_STUNTS) { SetPlayerPos(playerid, 1593.85059,2502.72729,578.09845); } else SendClientMessage(playerid,0xAA3333AA,"You must be on the stunter team to teleport to the stunter spawn!"); } if (!strcmp("/repair", cmdtext)) { if(gTeam[playerid] == TEAM_STUNTS) if(!IsPlayerInAnyVehicle(playerid)) RepairVehicle(GetPlayerVehicleID(playerid)); SendClientMessage(playerid, COLOR_GREEN, "Your vehicle has been repaired!"); return 1; } }
-Nacho