[Help]Team dm rand spawns! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help]Team dm rand spawns! (
/showthread.php?tid=121982)
[Help]Team dm rand spawns! -
Darkly_Face - 19.01.2010
So i have some warnings:
Code:
warning 235: public function lacks forward declaration (symbol "SetPlayerDMSpawn33")
warning 235: public function lacks forward declaration (symbol "SetPlayerDMSpawn32")
so and here is tele rand spawns and one script more.
so 2 teles:
Code:
if(strcmp(cmdtext, "/terror",true)==0)
{
RemovePlayerFromVehicle(playerid);
SetPlayerSkin( playerid, 287 );
SetPlayerColor(playerid, 0xFFFF00AA);
SetPlayerDMSpawn32(playerid);
GivePlayerWeapon(playerid, 29, 9000);
new name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has joined COUNTER STRIKE DM , type /CS to choose your team and join!", name);
SendClientMessageToAll(0xCCFFDD56,string);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"Try to kill Counterterrorists.",2500,3);
return 1;
}
if(strcmp(cmdtext, "/ct",true)==0)
{
RemovePlayerFromVehicle(playerid);
SetPlayerSkin( playerid, 285 );
SetPlayerColor(playerid, 0xCCFFDD56);
SetPlayerDMSpawn33(playerid);
GivePlayerWeapon(playerid, 29, 9000);
new name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has joined COUNTER STRIKE DM , type /CS to choose your team and join!", name);
SendClientMessageToAll(0xCCFFDD56,string);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"Try to kill Terrorists.",2500,3);
return 1;
}
and here is more 2 scripts:
Code:
public SetPlayerDMSpawn33(playerid){
new rand = random(sizeof(DMRandomSpawns33));
SetPlayerPos(playerid, DMRandomSpawns33[rand][0], DMRandomSpawns33[rand][1], DMRandomSpawns33[rand][2]); // Warp the player
DynUpdateStart(playerid); // Avoid falling through object's
return 1;}
public SetPlayerDMSpawn32(playerid){
new rand = random(sizeof(DMRandomSpawns32));
SetPlayerPos(playerid, DMRandomSpawns32[rand][0], DMRandomSpawns32[rand][1], DMRandomSpawns32[rand][2]); // Warp the player
DynUpdateStart(playerid); // Avoid falling through object's
return 1;}
Oh of course random spawn coords!
Code:
new Float:DMRandomSpawns33[3][3] = { //Ct
{202.1488,1869.9497,13.1406},
{300.0877,1816.3615,4.7109},
{246.0780,1859.7268,14.0840}
};
new Float:DMRandomSpawns32[3][3] = { //terror
{234.3317,1933.4460,33.8984},
{268.8228,1894.1642,33.8984},
{264.2560,1806.8811,33.8984}
};
Re: [Help]Team dm rand spawns! -
Paladin - 19.01.2010
Code:
forward SetPlayerDMSpawn33(playerid);
public SetPlayerDMSpawn33(playerid){
new rand = random(sizeof(DMRandomSpawns33));
SetPlayerPos(playerid, DMRandomSpawns33[rand][0], DMRandomSpawns33[rand][1], DMRandomSpawns33[rand][2]); // Warp the player
DynUpdateStart(playerid); // Avoid falling through object's
return 1;}
forward SetPlayerDMSpawn32(playerid);
public SetPlayerDMSpawn32(playerid){
new rand = random(sizeof(DMRandomSpawns32));
SetPlayerPos(playerid, DMRandomSpawns32[rand][0], DMRandomSpawns32[rand][1], DMRandomSpawns32[rand][2]); // Warp the player
DynUpdateStart(playerid); // Avoid falling through object's
return 1;}
Did you forward them?
Re: [Help]Team dm rand spawns! -
Darkly_Face - 19.01.2010
wow thx they work perfect