Scripting Help [+Rep]
#4

pawn Код:
enum sInfo
{
    Float:sX,
    Float:sY,
    Float:sZ
}
new SpawnInfo[MAX_PLAYERS][sInfo];

CMD:setspawn(playerid, params[])
{
    new Float:X, Float:Y, Float:Z;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
    SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}Spawn succesfully setted at this location.");
    GetPlayerPos(playerid, X, Y, Z);
    SpawnInfo[playerid][sX] = X;
    SpawnInfo[playerid][sY] = Y;
    SpawnInfo[playerid][sZ] = Z;
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, SpawnInfo[playerid][sX], SpawnInfo[playerid][sY], SpawnInfo[playerid][sZ]);
    return 1;
}
Reply


Messages In This Thread
Scripting Help [+Rep] - by arlindi - 25.12.2014, 19:46
Re: Scripting Help [+Rep] - by CachorroDoDavyJones - 25.12.2014, 19:52
Re: Scripting Help [+Rep] - by arlindi - 25.12.2014, 19:53
Re: Scripting Help [+Rep] - by HY - 25.12.2014, 19:54
Re: Scripting Help [+Rep] - by arlindi - 25.12.2014, 19:57
Re: Scripting Help [+Rep] - by HY - 25.12.2014, 19:59
Re: Scripting Help [+Rep] - by arlindi - 25.12.2014, 20:37
Re: Scripting Help [+Rep] - by arlindi - 15.01.2015, 20:20
Re: Scripting Help [+Rep] - by Alex Magaсa - 15.01.2015, 20:35

Forum Jump:


Users browsing this thread: 1 Guest(s)