Spawn cmd
#1

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
Reply
#2

BUMP
Reply
#3

This should work: http://pastebin.com/0Fv4rGjh
Reply
#4

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"
Reply
#5

Edit:
its best if you see and Implement on this tutorial
Tutorial
Reply
#6

Quote:
Originally Posted by SsHady
Посмотреть сообщение
post the code from 8000 to 8020
From OnPlayerSpawn till 8020

pawn Код:
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);
Reply
#7

It was just copied from the wiki:
pawn Код:
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:
pawn Код:
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.
Reply
#8

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"
Reply
#9

https://sampwiki.blast.hk/wiki/SetSpawnInfo
https://sampwiki.blast.hk/wiki/SetPlayerPos
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)