SA-MP Forums Archive
Setspawn - 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)
+--- Thread: Setspawn (/showthread.php?tid=500092)



Setspawn - KIllINGS - 11.03.2014

Hi
I give / setspawn not saved Spawn
What has?...
Command:
Код HTML:
CMD:setspawn(playerid, params[])
{
	//--------------------------------------------------------------------------
    if(GetPlayerClanRank(playerid) < 4) return
	SendClientMessage(playerid, COLOR_YELLOW, "{FF0000}ERROR: You have to be Clan Leader to use this comamnd!");
	//--------------------------------------------------------------------------
	ShowPlayerDialog( playerid, Clan_Spawn, DIALOG_STYLE_MSGBOX,"{0066CC}R{FFFF00}R{FF0000}S{AFAFAF} - Set Clan Spawn Place", "{FF9900}You can set your Clan Spawn Place after your current position!\n{FF9900}If is not the right spawn place press \"{FF0000}No{FF9900}\" and if you are sure press \"{FF0000}Yes{FF9900}\"", "Yes", "No");
	return 1;
}
Dialog
Код HTML:
	if(dialogid == Clan_Spawn)
    {
    	if(response)
        {
           	new CQuery[300], Float:X, Float:Y, Float:Z;
			GetPlayerPos(playerid, X, Y, Z);
  	    	format(CQuery, sizeof(CQuery), "UPDATE `clans` SET `clanposx` = %f, `clanposy` = %f, `clanposz` = %f WHERE `clanname` = '%s'", X, Y, Z, GetPlayerClan(playerid));
   			db_query( Database, CQuery );
			SendClientMessage(playerid, ~1,"{FF9900}Clan Spawn has been changed!");
        }
        if(!response)
        {
			SendClientMessage(playerid, ~1,"{FF9900}Come back after you find the right spawn place for your clan!");
        }
    }



Re: Setspawn - KIllINGS - 11.03.2014

UP!!!


Re: Setspawn - Dipto - 11.03.2014

what ur trying to make ?