27.07.2015, 09:43
You actually tried to assign a value to newcar in your last condition in your if statement which must have caused the unintended assignment warning. Just for your information, it is possible to assign values within the if statement which when put into proper use can make your code a little faster.
In your case, using a switch might make the code significantly faster.
Код:
if((newcar = !newcar)) //Toggle newcar { //will be executed if newcar was false }
Код:
switch(newcar) { case 106,107,108,109,144,145,146,148: { if(PlayerInfo[playerid][pMember] != 13 && PlayerInfo[playerid][pLeader] != 13) { SendClientMessage(playerid,COLOR_WHITE,"Nu esti membru {E4895E}Orleans Crime Family{FFFFFF}!"); RemovePlayerFromVehicle(playerid); } if(newcar == 105 && PlayerInfo[playerid][pRank] < 4) { SendClientMessage(playerid,COLOR_WHITE,"Iti trebuie {E4895E}rank 4{FFFFFF}!"); RemovePlayerFromVehicle(playerid); } } }