Originally Posted by HelderPT
Opa eu tenho isso num gm aq velho
Tipo vc esta na regiгo LS e morre e vai para ls, morre em sf nasce em sf serб isso?
PHP код:
stock IsPlayerInLs(playerid)
{
new Float:x,Float:y,Float:z;//-735,7062, -2954,502, 2931,147, 373,692);
GetPlayerPos(playerid, x, y, z);
if(x >= -735.7062 && y >= -2954.502 && x <= 2931.147 && y <= 373.692) return 1;
else return 0;
}
stock IsPlayerInLv(playerid)
{
new Float:x,Float:y,Float:z;//-2143,608, -151,5365, -2043,178, -76,58216 sf
GetPlayerPos(playerid, x, y, z);
if(x >= 852.4849 && y >= 490.4708 && x <= 2931.147 && y <= 2896.113) return 1;
else return 0;
}
stock IsPlayerInFc(playerid)
{
new Float:x,Float:y,Float:z;//-1167,788, 502,1487, 922,5522, 2942,825);
GetPlayerPos(playerid, x, y, z);
if(x >= -1167.788 && y >= 502.1487 && x <= 922.5522 && y <= 2942.825) return 1;
else return 0;
}
stock IsPlayerInSf(playerid)
{
new Float:x,Float:y,Float:z;//-2942,825, -2931,147, -992,6194, 2931,147);;
GetPlayerPos(playerid, x, y, z);
if(x >= -2942.825 && y >= -2931.147 && x <= -992.6194 && y <= 2931.147) return 1;
else return 0;
}
PUBLIC => OnPlayerDeath
PHP код:
if(IsPlayerInLs(playerid))
{
SetSpawnInfo(playerid, 0,DOF2_GetInt(file2, "Skin"), 1175.1531,-1312.8925,13.9880,266.1378,0,0,0,0,0,0); // Spawn Quando Morre
ClearAnimations(playerid);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
}
if(IsPlayerInLv(playerid)){
SetSpawnInfo(playerid, 0,DOF2_GetInt(file2, "Skin"), 1607.0583,1821.1628,10.8280,356.5667,0,0,0,0,0,0);
ClearAnimations(playerid);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
}
if(IsPlayerInFc(playerid)){
SetSpawnInfo(playerid, 0,DOF2_GetInt(file2, "Skin"), -316.3103,1053.5731,20.2879,1.6997,0,0,0,0,0,0);
ClearAnimations(playerid);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
}
if(IsPlayerInSf(playerid)){
SetSpawnInfo(playerid, 0,DOF2_GetInt(file2, "Skin"), -2652.3159,636.1181,14.4531,179.9128,0,0,0,0,0,0);
ClearAnimations(playerid);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
}
Use como base nem sei se funciona pois a gm aqui nгo compila
|