19.06.2016, 17:56
Quote:
So, the script will return when the if value is true?
new var = 2; if(var == 1) { } else if(var == 2) { } else if(var == 3) { } . The script will be returned at if var == 2 no ? if { } if { } will be used just if you want to check different values in any script. I understand now. Thank you. |
Код:
if(GetPlayerWeapon(playerid) == 4) // if player has a Knife it will Send player a message " This is a Knife" { SendClientMessage(playerid, -1, "This Is A Knife."); } else if(GetPlayerWeapon(playerid) == 5) // but if player has a Baseball Bat it will Send player a message " This is a BaseBall bat." { SendClientMessage(playerid, -1, "This is A BaseBall Bat."); }