pawn Код:
public SetPlayerRandomSpawn(playerid,type)
{
new rand;
new playername[32];
new house = PlayerInfo[playerid][pHousekey];
new complex = PlayerInfo[playerid][pComplexkey];
//SetPlayerWeapons(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,200);
SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,999);
SetPlayerFightingStyle(playerid,PlayerInfo[playerid][pFightSkill]);
if(PlayerInfo[playerid][pTut] == 0) {
SetPlayerScore(playerid,1);
PlayerInfo[playerid][pLevel] = 1;
SetPlayerPos(playerid, 215.7280,1821.2645,6.4141);
TogglePlayerControllable(playerid, 0);
AdminDuty[playerid] = 1;
PlayerInfo[playerid][pAdmin] = 0;
ShowPlayerDialog(playerid, REGISTRATION1,DIALOG_STYLE_MSGBOX,"Government(U.S. Registration) - Account Sex Management","Please specify your sex","Male","Female");
}
else if(PlayerInfo[playerid][pJailed] == 1) {
SetPlayerInterior(playerid, 10);
SetPlayerVirtualWorld(playerid,20);
DOO_SetPlayerPos(playerid,227.2460,109.7719,999.0156);
if(!PlayerInfo[playerid][pWakeMsgSend]) {
SendClientMessage(playerid, COLOR_PURPLE, "** You wake up in Jail **");
PlayerInfo[playerid][pWakeMsgSend]=1;
}
SetPlayerToTeamColor(playerid);
return 1;
}
else if(PlayerInfo[playerid][pJailed] == 2) {
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 1);
PlayerInfo[playerid][pInt] = 0;
DOO_SetPlayerPos(playerid,3523.9175,-503.7138,270.5802);
TogglePlayerControllable(playerid, 0);
Mute[playerid] = 1;
if(!PlayerInfo[playerid][pWakeMsgSend]) {
SendClientMessage(playerid, COLOR_LIGHTRED, " Incomplete Admin-Jail sentence");
PlayerInfo[playerid][pWakeMsgSend]=1;
}
SetPlayerToTeamColor(playerid);
return 1;
}
else if(PlayerInfo[playerid][pJailed] == 3) {
if(!PlayerInfo[playerid][pWakeMsgSend]) {
SendClientMessage(playerid, COLOR_PURPLE, "** You wake up in Prison **");
}
new string[128];
new sendername[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
rand = random(sizeof(gPrisonSpawns));
Pause(playerid); // Warp the player
DOO_SetPlayerPos(playerid, gPrisonSpawns[rand][0],gPrisonSpawns[rand][1], gPrisonSpawns[rand][2]);
SetPlayerFacingAngle(playerid,90);
format(string, sizeof(string), "* %s wakes up in his prison sell and looks around. ",sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
format(string, sizeof(string), "* %s sighs. ",sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
IntEntered[playerid] = 0;
//SetPlayerFacingAngle(playerid, 90);
return 1;
}
else if(Hospitalized[playerid] == 1) {
SetPlayerToTeamColor(playerid);
TogglePlayerControllable(playerid,false);
SetPlayerHealthExs(playerid,1.0);
DOO_SetPlayerPos(playerid, -3451.3801,475.9214,58.0620);
TogglePlayerControllable(playerid, 0);
new RandomWeth;
RandomWeth = random(2);
switch(RandomWeth) {
case 0:
{
SetPlayerVirtualWorld(playerid,1);
}
case 1:
{
SetPlayerVirtualWorld(playerid,2);
}
}
GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~You need to rest now, please wait",8000,3);
SetTimerEx("AfterSpawnHos", 10000, false, "i", playerid);
ApplyAnimationEx(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
return 1;
}
else if(PlayerInfo[playerid][pCrashed] >= 1 && PlayerInfo[playerid][pCrashed] <= 2) {
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
DOO_SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pWorld]);
if(PlayerInfo[playerid][pCrashHealth] > 5.0) {
SetPlayerHealthExs(playerid,PlayerInfo[playerid][pCrashHealth]);
}
else {
SetPlayerHealthExs(playerid,5.0);
}
SetPlayerArmourExs(playerid,PlayerInfo[playerid][pCrashArmour]);
SetTimerEx("UnsetCrash", 20000, false, "i", playerid);
return 1;
}
else if(PlayerInfo[playerid][pCrashed] > 2) {
PlayerInfo[playerid][pCrashed] = 0;
}
else if(house != 255) {
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,HouseInfo[house][hInt]);
SetPlayerVirtualWorld(playerid,house+100);
DOO_SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]);
PlayerInfo[playerid][pLocal] = house;
PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
HouseEntered[playerid] = house;
}
else if(complex != 255) {
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,MotelInfo[complex][mInt]);
SetPlayerVirtualWorld(playerid,complex+100);
// Warp the player
DOO_SetPlayerPos(playerid, MotelInfo[complex][mExitx], MotelInfo[complex][mExity],MotelInfo[complex][mExitz]);
PlayerInfo[playerid][pLocal] = complex;
PlayerInfo[playerid][pInt] = MotelInfo[complex][mInt];
MotelEntered[playerid] = complex;
return 1;
}
//PoliceForce spawn
else if (PlayerInfo[playerid][pMember] == 1) {
SetPlayerToTeamColor(playerid);
rand = random(sizeof(gCopPlayerSpawns));
// Warp the player
DOO_SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
}
//FBI spawn
else if (PlayerInfo[playerid][pMember] == 2) {
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,3);
DOO_SetPlayerPos(playerid, 299.7097,183.1322,1007.1719);
SetPlayerFacingAngle(playerid, 90);
SetPlayerVirtualWorld(playerid,1);
PlayerInfo[playerid][pInt] = 3;
IntEntered[playerid] = 14;
return 1;
}
else if(PlayerInfo[playerid][pMember] == 3) { //Mayor/Gov spawn
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 3);
DOO_SetPlayerPos(playerid, 356.2998,151.9914,1025.7891);
PlayerInfo[playerid][pInt] = 3;
IntEntered[playerid] = 5;
return 1;
}
else if(PlayerInfo[playerid][pMember] == 14) { //Sheriff Department
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 5);
DOO_SetPlayerPos(playerid, 322.72,306.4,999.11);
PlayerInfo[playerid][pInt] = 5;
IntEntered[playerid] = 5;
return 1;
}
//Fire/Ambulance spawn
else if (PlayerInfo[playerid][pMember] == 4) {
SetPlayerToTeamColor(playerid);
DOO_SetPlayerPos(playerid, -3429.0164,475.4126,57.6132);
SetPlayerFacingAngle(playerid, 0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid, 2);
IntEntered[playerid] = 2;
return 1;
}
//SAN News
else if (PlayerInfo[playerid][pMember] == 5) {
SetPlayerToTeamColor(playerid);
DOO_SetPlayerPos(playerid, 359.1299,211.8583,1008.3828);
SetPlayerFacingAngle(playerid, 0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid, 2);
IntEntered[playerid] = 2;
return 1;
}
// Taxi HQ
else if (PlayerInfo[playerid][pMember] == 7) {
SetPlayerToTeamColor(playerid);
DOO_SetPlayerPos(playerid, 2481.2283,-1538.6738,24.1845);
SetPlayerFacingAngle(playerid, 0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid, 2);
IntEntered[playerid] = 2;
return 1;
}
// Factions
else if (PlayerInfo[playerid][pMember] >= 7 && FamilyInfo[PlayerInfo[playerid][pMember]][FamilyInterior] != 0) {
new fam = PlayerInfo[playerid][pMember];
SetPlayerToTeamColor(playerid);
SetPlayerVirtualWorld(playerid,fam);
// Crackden
if(FamilyInfo[fam][FamilyInterior] == 1) {
SetPlayerInterior(playerid,5);
DOO_SetPlayerPos(playerid, 309.9930,1122.5713,1083.8828);
}
// Ryders House
else if(FamilyInfo[fam][FamilyInterior] == 2) {
SetPlayerInterior(playerid,2);
DOO_SetPlayerPos(playerid, 2465.8018,-1698.3330,1013.5078);
}
// CJs house
else if(FamilyInfo[fam][FamilyInterior] == 3) {
SetPlayerInterior(playerid,3);
DOO_SetPlayerPos(playerid, 2496.0498,-1694.3333,1014.7422);
}
// Maddogs mansion
else if(FamilyInfo[fam][FamilyInterior] == 4) {
SetPlayerInterior(playerid,5);
DOO_SetPlayerPos(playerid, 1267.663208,-781.323242,1091.906250);
}
// Tiger skin brothel
else if(FamilyInfo[fam][FamilyInterior] == 5) {
SetPlayerInterior(playerid,3);
DOO_SetPlayerPos(playerid, 964.106994,-53.205497,1001.124572);
} // Pleasure dome
else if(FamilyInfo[fam][FamilyInterior] == 6) {
SetPlayerInterior(playerid,3);
DOO_SetPlayerPos(playerid, -2640.762939,1406.682006, 906.460937);
} // Gang House
else if(FamilyInfo[fam][FamilyInterior] == 7) {
SetPlayerInterior(playerid,5);
DOO_SetPlayerPos(playerid, 2350.339843,-1181.649902,1027.976562);
} // Colonel Furhberger's
else if(FamilyInfo[fam][FamilyInterior] == 8) {
SetPlayerInterior(playerid,8);
DOO_SetPlayerPos(playerid, 2807.619873,-1171.899902,1025.570312);
} // Unused Safe House
else if(FamilyInfo[fam][FamilyInterior] == 9) {
SetPlayerInterior(playerid,12);
DOO_SetPlayerPos(playerid, 2324.419921,-1145.568359, 1050.710083);
} // LS Atruim
else if(FamilyInfo[fam][FamilyInterior] == 10) {
SetPlayerInterior(playerid,18);
DOO_SetPlayerPos(playerid, 1710.433715,-1669.379272, 20.225049);
}
return 1;
}
else { // Nooby Spawn
SetPlayerToTeamColor(playerid);
DOO_SetPlayerPos(playerid,1642.2334,-2240.4983,13.4952);
SetPlayerVirtualWorld(playerid,0);
SetPlayerFacingAngle(playerid, 0);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
printf("Spawned at Nooby Spawn");
return 1;
}
printf("Spawned player");
return 1;
}
The last part doesnt work, basically after changing to MySQL, this stopped working, I know has it doesnt show Spawned Player and Spawned at oob spawn