new checkca1[MAX_PLAYERS]; new checkca2[MAX_PLAYERS]; new checkca3[MAX_PLAYERS]; new checkca4[MAX_PLAYERS]; new checkca5[MAX_PLAYERS]; new checkca6[MAX_PLAYERS]; new checkca7[MAX_PLAYERS]; new checkca8[MAX_PLAYERS]; new checkca9[MAX_PLAYERS]; new checkca10[MAX_PLAYERS]; new checkca11[MAX_PLAYERS];
public OnPlayerEnterCheckpoint(playerid) { if(checkca1[playerid] == 1) { DisablePlayerCheckpoint(playerid); checkca1[playerid] = 0; checkca2[playerid] = 1; SetPlayerCheckpoint(playerid,1828.5288,-1926.8643,13.3837, 4.0); SendClientMessage(playerid,0xADFF2FAA, "Pegue o Caminhгo de lixo e vб recolhendo em alguns pontos da cidade."); return 1; } if(checkca2[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca2[playerid] = 0; checkca3[playerid] = 1; SetPlayerCheckpoint(playerid,1856.5773,-1268.8737,13.3906, 4.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 7 pontos de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo. "); } return 1; } if(checkca3[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca3[playerid] = 0; checkca4[playerid] = 1; SetPlayerCheckpoint(playerid,1973.9496,-1054.9626,24.3984, 5.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 6 pontos de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca4[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca4[playerid] = 0; checkca5[playerid] = 1; SetPlayerCheckpoint(playerid,2363.1702,-1159.0892,27.4513, 4.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 5 pontos de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca5[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca5[playerid] = 0; checkca6[playerid] = 1; SetPlayerCheckpoint(playerid,2714.9253,-1188.3448,69.2288, 4.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 4 pontos de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca6[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca6[playerid] = 0; checkca7[playerid] = 1; SetPlayerCheckpoint(playerid,2718.3643,-1520.4124,30.0480, 4.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 3 ponto de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca7[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca7[playerid] = 0; checkca8[playerid] = 1; SetPlayerCheckpoint(playerid,2338.2581,-1576.3217,23.8032, 4.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 2 pontso de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca8[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca8[playerid] = 0; checkca9[playerid] = 1; SetPlayerCheckpoint(playerid,2220.6677,-1761.7015,13.3650, 4.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 1 ponto de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca9[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca9[playerid] = 0; checkca10[playerid] = 1; SetPlayerCheckpoint(playerid,2213.1135,-2053.4668,14.0966, 5.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Leve os lixo atй o deposito."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca10[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca10[playerid] = 0; checkca11[playerid] = 1; SetPlayerCheckpoint(playerid,2199.1770,-1970.4202,13.7841, 2.0); SendClientMessage(playerid,0xADFF2FAA, "{00FF00}Agora vб receber o Dinheiro."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "{FFFF00}[Trabalho]:{FFFFFF}Aqui nгo й o escritуrio."); } return 1; } if(checkca11[playerid] == 1) { DisablePlayerCheckpoint(playerid); checkca11[playerid] = 0; SendClientMessage(playerid,0xADFF2FAA, "Vocк conseguiu {FFFFFF}200$ pelo trabalho."); GameTextForPlayer(playerid,"~h~~g~+200$",3000,5); GivePlayerMoney(playerid, 200); } return 1; }
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/plixo",true) == 0) SetPlayerCheckpoint(playerid,2171.8494,-1979.3674,13.5547, 2.0); checkca1[playerid] = 1; SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Agora vocк e um Lixeiro."); return 1; }
tб , eu acho que passei um pouco dos limites mesmo , peзo minhas disculpas!! eu achi um , tipo assim, e pra lixeiro , mais na hora que conpilo o gm para de responder
assim coloquei isso no comeзo. do gm Код:
new checkca1[MAX_PLAYERS]; new checkca2[MAX_PLAYERS]; new checkca3[MAX_PLAYERS]; new checkca4[MAX_PLAYERS]; new checkca5[MAX_PLAYERS]; new checkca6[MAX_PLAYERS]; new checkca7[MAX_PLAYERS]; new checkca8[MAX_PLAYERS]; new checkca9[MAX_PLAYERS]; new checkca10[MAX_PLAYERS]; new checkca11[MAX_PLAYERS]; Код:
public OnPlayerEnterCheckpoint(playerid) { if(checkca1[playerid] == 1) { DisablePlayerCheckpoint(playerid); checkca1[playerid] = 0; checkca2[playerid] = 1; SetPlayerCheckpoint(playerid,1828.5288,-1926.8643,13.3837, 4.0); SendClientMessage(playerid,0xADFF2FAA, "Pegue o Caminhгo de lixo e vб recolhendo em alguns pontos da cidade."); return 1; } if(checkca2[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca2[playerid] = 0; checkca3[playerid] = 1; SetPlayerCheckpoint(playerid,1856.5773,-1268.8737,13.3906, 4.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 7 pontos de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo. "); } return 1; } if(checkca3[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca3[playerid] = 0; checkca4[playerid] = 1; SetPlayerCheckpoint(playerid,1973.9496,-1054.9626,24.3984, 5.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 6 pontos de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca4[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca4[playerid] = 0; checkca5[playerid] = 1; SetPlayerCheckpoint(playerid,2363.1702,-1159.0892,27.4513, 4.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 5 pontos de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca5[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca5[playerid] = 0; checkca6[playerid] = 1; SetPlayerCheckpoint(playerid,2714.9253,-1188.3448,69.2288, 4.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 4 pontos de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca6[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca6[playerid] = 0; checkca7[playerid] = 1; SetPlayerCheckpoint(playerid,2718.3643,-1520.4124,30.0480, 4.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 3 ponto de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca7[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca7[playerid] = 0; checkca8[playerid] = 1; SetPlayerCheckpoint(playerid,2338.2581,-1576.3217,23.8032, 4.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 2 pontso de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca8[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca8[playerid] = 0; checkca9[playerid] = 1; SetPlayerCheckpoint(playerid,2220.6677,-1761.7015,13.3650, 4.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Hб ainda 1 ponto de coleta."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca9[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca9[playerid] = 0; checkca10[playerid] = 1; SetPlayerCheckpoint(playerid,2213.1135,-2053.4668,14.0966, 5.0); SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Leve os lixo atй o deposito."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "Vocк precisa do caminhгo para coletar o lixo."); } return 1; } if(checkca10[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 408) { DisablePlayerCheckpoint(playerid); checkca10[playerid] = 0; checkca11[playerid] = 1; SetPlayerCheckpoint(playerid,2199.1770,-1970.4202,13.7841, 2.0); SendClientMessage(playerid,0xADFF2FAA, "{00FF00}Agora vб receber o Dinheiro."); } else { SendClientMessage(playerid, COLOR_GREENYELLOW, "{FFFF00}[Trabalho]:{FFFFFF}Aqui nгo й o escritуrio."); } return 1; } if(checkca11[playerid] == 1) { DisablePlayerCheckpoint(playerid); checkca11[playerid] = 0; SendClientMessage(playerid,0xADFF2FAA, "Vocк conseguiu {FFFFFF}200$ pelo trabalho."); GameTextForPlayer(playerid,"~h~~g~+200$",3000,5); GivePlayerMoney(playerid, 200); } return 1; } Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/plixo",true) == 0) SetPlayerCheckpoint(playerid,2171.8494,-1979.3674,13.5547, 2.0); checkca1[playerid] = 1; SendClientMessage(playerid,0xADFF2FAA, "{FFFF00}[Trabalho]:{FFFFFF}Agora vocк e um Lixeiro."); return 1; } |
CheckPoint = CreateDynamicCP(Float:x, Float:y, Float:z, 5.0 -1,-1, playerid, 100.0);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == CheckPoint)
{
SendClientMessge(playerid, -1, "Vocк entrou no check point.");
DestroyDynamicRaceCP(CheckPoint);
}
return 1;
}
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(checkpointid == CheckPoint)
{
SendClientMessge(playerid, -1, "Vocк saiu do check point.");
DestroyDynamicRaceCP(CheckPoint);
}
return 1;
}
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
Float:x = Coordenada X Float:y = Coordenada Y Float:z = Coordenada Z Float:size = O tamanho do ponto worldid = ID do Mundo. Caso queira que apareзa em todos os mundos use -1 interiorid = Id do Interior. Caso queira que apareзa em todos o interiores use -1 playerid = Id do jogador. Caso queira que apareзa para todos os jogadores use -1 streamdistance = A distвncia mбxima que o check point iб aparecer. Se eu nгo me engano o mбximo й 100.0(posso estar errado)