09.06.2012, 07:15
Hello,
I Was Bored This Morning So I Decided To Create Something Simple And I Created IG Spawn Location Changing System Which I, Myself Wont Be Using It So Released It For The Community.
Pastebin.
I Was Bored This Morning So I Decided To Create Something Simple And I Created IG Spawn Location Changing System Which I, Myself Wont Be Using It So Released It For The Community.
Pastebin.
pawn Код:
// Dynamic I-G Spawn Location Changing System By Littlehelper[MDZ].
// Please Donot Remove The Credits And/Or Redistribute This As Your Own!
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
new
Float:CurrentSpawn[3];
new
Float:CurrentFA[1];
#define DIALOG_SPAWN 999
public OnFilterScriptInit()
{
print("\n-----------------------------------------------------");
print("IG Spawn Location Changing By Littlehelper[MDZ] Loaded");
print("--------------------------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
SendClientMessageToAll(-1,"Server Using 'IG Spawn Location Changing' By Littlehelper[MDZ]");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SendClientMessage(playerid,-1,"Type /NewSpawn To Change Your Spawn Location");
SetPlayerPos(playerid,CurrentSpawn[0],CurrentSpawn[1],CurrentSpawn[2]);
SetPlayerFacingAngle(playerid,CurrentFA[0]);
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new Float:X,Float:Y,Float:Z,Float:FA,String[128],pName[128];
if(dialogid == DIALOG_SPAWN)
{
if(!response) return TogglePlayerControllable(playerid,true);
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,FA);
CurrentSpawn[0] = Float:X;
CurrentSpawn[1] = Float:Y;
CurrentSpawn[2] = Float:Z;
CurrentFA[0] = Float:FA;
TogglePlayerControllable(playerid,true);
GetPlayerName(playerid,pName,sizeof(pName));
format(String,sizeof(String),"Spawn Location Has Been Changed By Administrator %s",pName);
SendClientMessageToAll(-1,String);
SendClientMessage(playerid,-1,"Spawning Area Has Been Changed Successfully!");
}
return 0;
}
CMD:kill(playerid,params[])
{
SpawnPlayer(playerid);
return 1;
}
CMD:newspawn(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"You Are Not Authorized To Use This Command!"); // You Can Remove This If You Dont Want Only Administrators To Use This Command.
TogglePlayerControllable(playerid,false);
ShowPlayerDialog(playerid,DIALOG_SPAWN,DIALOG_STYLE_MSGBOX,"{FFAF00}:: {FFFFFF}Dynamic Spawn Changing","{FFFFFF}Are You Sure You Want To Change The Spawn Area To This Place?","Yes","No");
return 1;
}
Don't Remove The Credits And Keep It Clean
PS: Rate Please.