29.05.2018, 20:50
Estou tentando colocar pra o player spawnar com tais armas conforme o score, porem, quando o player loga e spawna de primeira, ele spawna somente com uma arma, nгo com as outras que deveria ser pelo seu nнvel, as outras armas aparecem somente depois que o player morre pela primeira vez.
Exmplo:
Mas aparece sу uma Desert Eagle (ARMA ID 24), somente depois que eu morro pela primeira vez aparece as armas citadas a cima nos spawns.
Code:
No final do gamemode:
Da um help ai pls :V
Exmplo:
PHP код:
Tenho 1000 kills, deveria aparecer
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 27, 500);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 34, 90);
GivePlayerWeapon(playerid, 31, 1500);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 37, 5);
Code:
PHP код:
Em "public OnPlayerSpawn"
DarArmas(playerid);
PHP код:
DarArmas(playerid)
{
if(IsPlayerConnected(playerid))
{
if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 30){
GivePlayerWeapon(playerid, 24, 500);
}
if(GetPlayerScore(playerid) >= 30 && GetPlayerScore(playerid) <= 80){
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 25, 500);
}
if(GetPlayerScore(playerid) >= 80 && GetPlayerScore(playerid) <= 150){
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 29, 500);
}
if(GetPlayerScore(playerid) >= 150 && GetPlayerScore(playerid) <= 230){
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 29, 500);
}
if(GetPlayerScore(playerid) >= 230 && GetPlayerScore(playerid) <= 320){
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 30, 1500);
SetPlayerArmour(playerid, 20);
}
if(GetPlayerScore(playerid) >= 320 && GetPlayerScore(playerid) <= 450){
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 31, 1500);
SetPlayerArmour(playerid, 20);
}
if(GetPlayerScore(playerid) >= 450 && GetPlayerScore(playerid) <= 700){
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 27, 500);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 31, 1500);
SetPlayerArmour(playerid, 20);
}
if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) <= 1000){
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 27, 500);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 31, 1500);
SetPlayerArmour(playerid, 60);
}
if(GetPlayerScore(playerid) >= 1000 && GetPlayerScore(playerid) <= 1337){
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 27, 500);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 34, 90);
GivePlayerWeapon(playerid, 31, 1500);
SetPlayerArmour(playerid, 60);
}
if(GetPlayerScore(playerid) >= 1337 && GetPlayerScore(playerid) <= 9999999){
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 27, 500);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 34, 90);
GivePlayerWeapon(playerid, 31, 1500);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 37, 5);
}
}
return 1;
}