11.03.2014, 14:10
Hi
I give / setspawn not saved Spawn
What has?...
Command:
Dialog
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; }
Код 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!"); } }