18.01.2011, 01:00
What hasn't correctly made?
new prov,prov2;
Doesn't work:
new prov,prov2;
Код:
if (strcmp("/1", cmdtext, true, 10) == 0) { if(prov == 0 || prov2 == 0) { if(GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,-2792.7700,-10.3369,7.0391)) { SendClientMessage(playerid, COLOR_RED, " action 1"); prov = 1; } else if(GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,-2794.9434,216.4308,7.1875)) { SendClientMessage(playerid, COLOR_RED, " action 2"); prov2 = 1; } else { SendClientMessage(playerid, COLOR_RED, "You not on a pickup."); } } else if(prov == 1 || prov2 == 1) { SendClientMessage(playerid, COLOR_RED, "Action is already carried out"); } return 1; } if (strcmp("/2", cmdtext, true, 10) == 0) { if(prov == 1 || prov2 == 1) { if(GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,-2792.7700,-10.3369,7.0391)) { SendClientMessage(playerid, COLOR_RED, " action 1"); prov = 0; } else if(GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,-2794.9434,216.4308,7.1875)) { SendClientMessage(playerid, COLOR_RED, " action 2"); prov2 = 0; } else { SendClientMessage(playerid, COLOR_RED, "You not on a pickup."); } } else if(prov == 0 || prov2 == 0) { SendClientMessage(playerid, COLOR_RED, "Have already cancelled action"); } return 1; }
Код:
if(prov == 0 || prov2 == 0) {