PDA

View Full Version : Spawn cmd


Sliceofdeath
09/08/2013, 08:56 AM
How to make a spawn cmd like , When we do /spawn at a place we will be spawned at that place.

Like i did /spawn at a place and came after sometime and did SPAWN [While skin time] so we will be spawned at place where we did /spawn not place where random spawns are made.

and even after getting killed also we will spawn at place where we have made /spawn

Sliceofdeath
09/08/2013, 09:49 AM
BUMP

Originality
09/08/2013, 10:31 AM
This should work: http://pastebin.com/0Fv4rGjh

Sliceofdeath
09/08/2013, 10:37 AM
Errors.

XYZ:\games\server\EF\gamemodes\EF(8008) : error 017: undefined symbol "team"
XYZ:\games\server\EF\gamemodes\EF(8011) : error 017: undefined symbol "X"

SsHady
09/08/2013, 10:39 AM
Edit:
its best if you see and Implement on this tutorial
Tutorial (http://forum.sa-mp.com/showthread.php?t=299791)

Sliceofdeath
09/08/2013, 10:43 AM
post the code from 8000 to 8020

From OnPlayerSpawn till 8020

public OnPlayerSpawn(playerid)
{
Spawned[playerid] = 1;
TextDrawShowForPlayer(playerid, Time), TextDrawShowForPlayer(playerid, Date);
SetPlayerPos(playerid,834.964,-2040.216,12.867);
InDM[playerid] = 0;
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerInterior(playerid, 0);
SetTimerEx("Unfreeze", 2000, 0, "d", playerid);
GameTextForPlayer(playerid,"~g~Waiting for the Objects to load",2000,3);
return 1;
}
CMD:spawn(playerid, params[])
{
if(Spawned[playerid] == 0)
{
SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
SpawnPlayer(playerid);
}
else SetPlayerPos(playerid, X, Y, Z);
return 1;
}
CMD:rw(playerid, params[])
{
InDM[playerid] = 1;
SendClientMessage(playerid, -1, "{66FF66}Welcome to Running Weapons DM {BABABA}(SawnOff - Uzi)");
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
ResetPlayerWeapons(playerid);

Konstantinos
09/08/2013, 10:50 AM
It was just copied from the wiki:

SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);


You should assign values to it. Same goes for:

else SetPlayerPos(playerid, X, Y, Z);


I assume it was just an example of him and he let you to replace them with the coordinates and all that you want.

Sliceofdeath
09/08/2013, 10:53 AM
XY:\games\server\EF\gamemodes\EF(8008) : error 029: invalid expression, assumed zero
XY:\games\server\EF\gamemodes\EF(8008) : error 017: undefined symbol "X"
XY:\games\server\EF\gamemodes\EF(8011) : error 017: undefined symbol "X"

Konstantinos
09/08/2013, 10:55 AM
http://wiki.sa-mp.com/wiki/SetSpawnInfo
http://wiki.sa-mp.com/wiki/SetPlayerPos

Sliceofdeath
09/08/2013, 10:58 AM
http://wiki.sa-mp.com/wiki/SetSpawnInfo
http://wiki.sa-mp.com/wiki/SetPlayerPos

Better i don't add /spawn in the server.
Cause wiki don't teach me anything -.-''

SsHady
09/08/2013, 11:04 AM
Well sir for your kind Information
Wiki is The only source That teaches Us Correctly and All the Pro Scripters in This Forum have learned From the wiki.

Sliceofdeath
09/08/2013, 11:24 AM
Well sir for your kind Information
Wiki is The only source That teaches Us Correctly and All the Pro Scripters in This Forum have learned From the wiki.


Ok can u give me this filterscript well ? only this time .