Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new spawnLV = 0;
- new spawnLS = 0;
- new spawnSF = 0;
- new randomspawn = 1;
- new Float:LVSpawn[][4] =
- {
- {1933.1464,1343.5929,9.9688,269.2728}, // LVS1
- {1958.5511,1342.9436,15.3746,269.2821}, // LVS2
- {2033.4695,1544.2429,10.8203,268.1299}, // LVS3
- {2223.4128,1837.3754,10.8203,89.4003}, // LVS4
- {2192.8105,1987.5022,12.2969,88.9012} // LVS5
- //Add your random spawns here with cords for LV
- };
- new Float:SFSpawn[][4] =
- {
- {-1811.6882,-149.2168,9.3984,357.6486}, // SFS1
- {-1521.9855,807.8555,7.1875,89.6792}, // SFS2
- {-1596.5006,863.4152,7.6875,177.6337}, // SFS3
- {-1572.8306,819.5630,7.1875,177.6337}, // SFS4
- {-1605.2600,714.1086,13.0824,357.6337} // SFS5
- //Add your random spawns here with cords for SF
- };
- new Float:LSSpawn[][4] =
- {
- {1119.6107,-930.1211,43.0991,268.2935}, // LSS1
- {1174.9585,-885.5205,43.2609,282.3936}, // LSS2
- {1129.0831,-1466.4542,15.7498,3.0928}, // LSS3
- {1552.1587,-1675.7168,16.1683,89.2326}, // LSS4
- {354.3548,-1814.6611,4.3767,359.7548} // LSS5
- //Add your random spawns here with cords for LS
- };
- new Float:RandomSpawn[][4] =
- {
- {1119.6107,-930.1211,43.0991,268.2935}, // LSS1
- {1174.9585,-885.5205,43.2609,282.3936}, // LSS2
- {-1572.8306,819.5630,7.1875,177.6337}, // SFS4
- {-1605.2600,714.1086,13.0824,357.6337}, // SFS5
- {1129.0831,-1466.4542,15.7498,3.0928}, // LSS3
- {1933.1464,1343.5929,9.9688,269.2728}, // LVS1
- {1958.5511,1342.9436,15.3746,269.2821}, // LVS2
- {2033.4695,1544.2429,10.8203,268.1299}, // LVS3
- {1552.1587,-1675.7168,16.1683,89.2326}, // LSS4
- {-1811.6882,-149.2168,9.3984,357.6486}, // SFS1
- {-1521.9855,807.8555,7.1875,89.6792}, // SFS2
- {-1596.5006,863.4152,7.6875,177.6337}, // SFS3
- {354.3548,-1814.6611,4.3767,359.7548}, // LSS5
- {2223.4128,1837.3754,10.8203,89.4003}, // LVS4
- {2192.8105,1987.5022,12.2969,88.9012} // LVS5
- //Add your random spawns here with cords for random spawns
- };
- public OnPlayerSpawn(playerid)
- {
- new LVrand = random(sizeof(LVSpawn));
- new SFrand = random(sizeof(SFSpawn));
- new LSrand = random(sizeof(LSSpawn));
- new randrand = random(sizeof(RandomSpawn));
- if(spawnLV == 1)
- {
- SetPlayerPos(playerid, LVSpawn[LVrand][0], LVSpawn[LVrand][1],LVSpawn[LVrand][2]);
- }
- if(spawnSF == 1)
- {
- SetPlayerPos(playerid, SFSpawn[SFrand][0], SFSpawn[SFrand][1],SFSpawn[SFrand][2]);
- }
- if(spawnLS == 1)
- {
- SetPlayerPos(playerid, LSSpawn[LSrand][0], LSSpawn[LSrand][1],LSSpawn[LSrand][2]);
- }
- if(randomspawn == 1)
- {
- SetPlayerPos(playerid, RandomSpawn[randrand][0], RandomSpawn[randrand][1],RandomSpawn[randrand][2]);
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/sfspawn", cmdtext, true, 10) == 0)
- {
- spawnSF = 1;
- spawnLV = 0;
- spawnLS = 0;
- randomspawn = 0;
- SendClientMessage(playerid, 0x99FFFF, "You have set your spawnpoint to SF!");
- new str[64];
- format(str,sizeof(str),"~b~Spawnpoint:~n~~r~LV~b~/~r~LS~b~/~g~SF");
- GameTextForPlayer(playerid, str, 5000, 6);
- return 1;
- }
- if (strcmp("/lvspawn", cmdtext, true, 10) == 0)
- {
- spawnSF = 0;
- spawnLV = 1;
- spawnLS = 0;
- randomspawn = 0;
- SendClientMessage(playerid, 0x99FFFF, "You have set your spawnpoint to LV!");
- new str[64];
- format(str,sizeof(str),"~b~Spawnpoint:~n~~g~LV~b~/~r~LS~b~/~r~SF");
- GameTextForPlayer(playerid, str, 5000, 6);
- return 1;
- }
- if (strcmp("/lsspawn", cmdtext, true, 10) == 0)
- {
- spawnSF = 0;
- spawnLV = 0;
- spawnLS = 1;
- randomspawn = 0;
- SendClientMessage(playerid, 0x99FFFF, "You have set your spawnpoint to LS!");
- new str[64];
- format(str,sizeof(str),"~b~Spawnpoint:~n~~r~LV~b~/~g~LS~b~/~r~SF");
- GameTextForPlayer(playerid, str, 5000, 6);
- return 1;
- }
- if (strcmp("/randomspawn", cmdtext, true, 10) == 0)
- {
- spawnSF = 0;
- spawnLV = 0;
- spawnLS = 0;
- randomspawn = 1;
- SendClientMessage(playerid, 0x99FFFF, "You will now spawn in random cities!");
- new str[64];
- format(str,sizeof(str),"~b~Spawnpoint:~n~~g~Random");
- GameTextForPlayer(playerid, str, 5000, 6);
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement