05.06.2016, 10:09
helloo there i'm trying to make a prototype system in my gamemode
this is my prototype script
the problems are:
1 when i enter the prototype vehicle i got the message spammed in my chatbox
2 i cant prevent the team to not enter their own prototype
plss help i dont know whats wrong with the script
sry for my bad english
this is my prototype script
Код:
public OnPlayerEnterVehicle(playerid, vehicleid) { if(RecentlyCaptured[europro] || RecentlyCaptured[asiapro] || RecentlyCaptured[africapro] || RecentlyCaptured[usapro] || RecentlyCaptured[auspro] == 1) { SendClientMessage(playerid, COLOR_RED, "The Current Prototype has been captured recently. Please wait."); RemovePlayerFromVehicle(playerid); //auspro //if(vehicleid == auspro && Team[playerid] == AUSTRALIA || Team[playerid] == ADMIN || Team[playerid] == MERCENARY ) {RemovePlayerFromVehicle(playerid);} if(GetVehicleModel(vehicleid) == auspro && Team[playerid] != AUSTRALIA || Team[playerid] != ADMIN || Team[playerid] != MERCENARY ) { SendClientMessage(playerid, -1, "You Steal Australia Prototype"); SendClientMessageToAll(COLOR_RED,"Someone Tries To Steal Australia Prototype"); if(Team[playerid] == ASIA && vehicleid == auspro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][auspro] = 1; SetPlayerCheckpoint(playerid,1136.6808,1968.4490,10.8203, 10.0); } if(Team[playerid] == AFRICA && vehicleid == auspro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][auspro] = 1; SetPlayerCheckpoint(playerid,-754.0302,1586.2006,26.9609, 10.0); } if(Team[playerid] == AMERICA && vehicleid == auspro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][auspro] = 1; SetPlayerCheckpoint(playerid,-145.1369,1120.6730,19.7500, 10.0); } if(Team[playerid] == EUROPE && vehicleid == auspro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][auspro] = 1; SetPlayerCheckpoint(playerid,-167.9965,2720.3223,62.1003, 10.0); } } //asiapro if(vehicleid == asiapro && Team[playerid] != ASIA || Team[playerid] != ADMIN || Team[playerid] != MERCENARY ) { SendClientMessage(playerid, -1, "You Steal Asia Prototype"); SendClientMessageToAll(COLOR_RED,"Someone Tries To Steal Asia Prototype"); if(Team[playerid] == AUSTRALIA && vehicleid == asiapro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][asiapro] = 1; SetPlayerCheckpoint(playerid,429.3654,2515.2388,16.1535, 10.0); } if(Team[playerid] == AFRICA && vehicleid == asiapro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][asiapro] = 1; SetPlayerCheckpoint(playerid,-754.0302,1586.2006,26.9609, 10.0); } if(Team[playerid] == AMERICA && vehicleid == asiapro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][asiapro] = 1; SetPlayerCheckpoint(playerid,-145.1369,1120.6730,19.7500, 10.0); } if(Team[playerid] == EUROPE && vehicleid == asiapro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][asiapro] = 1; SetPlayerCheckpoint(playerid,-167.9965,2720.3223,62.1003, 10.0); } } //africapro if(vehicleid == africapro && Team[playerid] != AFRICA || Team[playerid] != ADMIN || Team[playerid] != MERCENARY ) { SendClientMessage(playerid, -1, "You Steal Africa Prototype"); SendClientMessageToAll(COLOR_RED,"Someone Tries To Steal Africa Prototype"); if(Team[playerid] == AUSTRALIA && vehicleid == africapro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][africapro] = 1; SetPlayerCheckpoint(playerid,429.3654,2515.2388,16.1535, 10.0); } if(Team[playerid] == ASIA && vehicleid == africapro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][africapro] = 1; SetPlayerCheckpoint(playerid,1136.6808,1968.4490,10.8203, 10.0); } if(Team[playerid] == AMERICA && vehicleid == africapro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][africapro] = 1; SetPlayerCheckpoint(playerid,-145.1369,1120.6730,19.7500, 10.0); } if(Team[playerid] == EUROPE && vehicleid == africapro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][africapro] = 1; SetPlayerCheckpoint(playerid,-167.9965,2720.3223,62.1003, 10.0); } } //americapro if(vehicleid == usapro && Team[playerid] != AMERICA || Team[playerid] != ADMIN || Team[playerid] != MERCENARY ) { SendClientMessage(playerid, -1, "You Steal America Prototype"); SendClientMessageToAll(COLOR_RED,"Someone Tries To Steal America Prototype"); if(Team[playerid] == AUSTRALIA && vehicleid == usapro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][usapro] = 1; SetPlayerCheckpoint(playerid,429.3654,2515.2388,16.1535, 10.0); } if(Team[playerid] == ASIA && vehicleid == usapro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][usapro] = 1; SetPlayerCheckpoint(playerid,1136.6808,1968.4490,10.8203, 10.0); } if(Team[playerid] == AFRICA && vehicleid == usapro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][usapro] = 1; SetPlayerCheckpoint(playerid,-754.0302,1586.2006,26.9609, 10.0); } if(Team[playerid] == EUROPE && vehicleid == usapro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][usapro] = 1; SetPlayerCheckpoint(playerid,-167.9965,2720.3223,62.1003, 10.0); } } //europepro // if(GetVehicleModel(vehicleid) == europro && Team[playerid] == EUROPE ) {RemovePlayerFromVehicle(playerid);} if(GetVehicleModel(vehicleid) == europro && Team[playerid] != EUROPE || Team[playerid] != ADMIN || Team[playerid] != MERCENARY ) { SendClientMessage(playerid, -1, "You Steal Europe Prototype"); SendClientMessageToAll(COLOR_RED,"Someone Tries To Steal Europe Prototype"); if(Team[playerid] == AUSTRALIA && GetVehicleModel(vehicleid) == europro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][europro] = 1; SetPlayerCheckpoint(playerid,429.3654,2515.2388,16.1535, 10.0); } if(Team[playerid] == ASIA && GetVehicleModel(vehicleid) == europro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][europro] = 1; SetPlayerCheckpoint(playerid,1136.6808,1968.4490,10.8203, 10.0); } if(Team[playerid] == AFRICA && GetVehicleModel(vehicleid) == europro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][europro] = 1; SetPlayerCheckpoint(playerid,-754.0302,1586.2006,26.9609, 10.0); } if(Team[playerid] == AMERICA && GetVehicleModel(vehicleid) == europro) { SendClientMessage(playerid, COLOR_GREEN, "Deliver Prototype To The Checkpoint in Your Base"); IsCapturing[playerid][europro] = 1; SetPlayerCheckpoint(playerid,-145.1369,1120.6730,19.7500, 10.0); } } } return 1; }
1 when i enter the prototype vehicle i got the message spammed in my chatbox
2 i cant prevent the team to not enter their own prototype
plss help i dont know whats wrong with the script
sry for my bad english