15.12.2011, 01:38
Hello all, i have a problem with my infecting system, well, i made this:
And this:
And this... :
I dont know why, when i infect somebody, he spawn as human again
And i have other question, Is this ok? : Im a new at the world of scripting
The message about "Level up" didnt apear
Plz dont post coments like: Solve your problems by yourself, blabla, thanks for help, and see ya
Pd: sorry about the order of the script, im new using the "Quote" buttom, Im using ****** translator
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys == KEY_FIRE) { for(new i=0;i<MAX_PLAYERS;i++) { new Float:X, Float:Y, Float:Z; GetPlayerPos(i, X, Y, Z); if(gTeam[playerid] == Zombie) { if(IsPlayerInRangeOfPoint(playerid, 1.0, X, Y, Z)) { if(gTeam[i] != Zombie) { new Float:H; GetPlayerHealth(i, H); SetPlayerHealth(i, H-10); SetPVarInt(playerid, "Infected", 1); if(GetPVarInt(playerid,"Infected") == 0) { GameTextForPlayer(i, "~r~Infected!", 500, 3); } } } } } } return 1; }
Quote:
public OnPlayerDeath(playerid, killerid, reason) { if(IsPlayerAdmin(playerid)) { SendClientMessage(killerid, BLUE, "You get 100 points because you killed a RCON Admin"); SetPlayerScore(killerid,GetPlayerScore(killerid)+1 00); if(GetPVarInt(playerid, "Infected") == 1) { gTeam[playerid] = Zombie; } } else { SetPlayerScore(killerid,GetPlayerScore(killerid)+1 0); SendClientMessage(killerid, BLUE, "You get 10 points because you killed."); if(GetPVarInt(playerid, "Infected") == 1) { gTeam[playerid] = Zombie; SetPlayerPos(playerid,-2237.0930,-2524.3779,31.4251); SetPlayerSkin(playerid, 7; SetPlayerWeather(playerid, 25); SetPlayerColor(playerid, COLOR_ZOMBIE); } } return 1; } |
Quote:
public OnPlayerSpawn(playerid) { if(gTeam[playerid] == Zombie) { SetPlayerWeather(playerid, 25); SetPlayerPos(playerid, -2176.4133,-2408.7175,35.2969); } else if(gTeam[playerid] == Human) { SetPlayerPos(playerid,-2237.0930,-2524.3779,31.4251); } return 1; } |
And i have other question, Is this ok? : Im a new at the world of scripting
Quote:
forward ActualizarLevel(playerid) public ActualizarLevel(playerid) { if(GetPlayerScore(playerid) >= 50) { GameTextForPlayer(playerid, "~r~Level up!", 500, 3); Rank[playerid] = 2; } if(GetPlayerScore(playerid) >= 100) { GameTextForPlayer(playerid, "~r~Level up!", 500, 3); Rank[playerid] = 3; } if(GetPlayerScore(playerid) >= 150) { GameTextForPlayer(playerid, "~r~Level up!", 500, 3); Rank[playerid] = 4; } if(GetPlayerScore(playerid) >= 200) { GameTextForPlayer(playerid, "~r~Level up!", 500, 3); Rank[playerid] = 5; } if(GetPlayerScore(playerid) >= 300) { GameTextForPlayer(playerid, "~r~Level up!", 500, 3); Rank[playerid] = 6; } } |
Plz dont post coments like: Solve your problems by yourself, blabla, thanks for help, and see ya
Pd: sorry about the order of the script, im new using the "Quote" buttom, Im using ****** translator