28.11.2010, 17:28
i have made a send dm request cmd so if you want to dm then u send this but i cant get it where it wont let a player just do /accept to teleport themselves away can someone help
sendr cmd
accept cmd
denie cmd
thx
sendr cmd
Код:
dcmd_sendr(const playerid,const params[]) { new ID = strval(params); if(!strlen(params)) return SendClientMessage(playerid,RED,"Error: \"/sendr < ID>\"."); SetPVarInt(ID, "Sendr", GetPVarInt(ID, "Sendr")+1); SendClientMessage(playerid,ORANGE,"You sent the request"); SendClientMessage(ID,ORANGE,"ID %s has sent you a DM Request. /Accept id or /denie id"); return 1; }
Код:
dcmd_accept(const playerid,const params[]) { new ID = strval(params); if(!strlen(params)) return SendClientMessage(playerid,RED,"Error: \"/accept < ID>\"."); if(ID == playerid) return SendClientMessage(playerid, RED, "You cannot dm yourself!"); if(GetPVarInt(playerid, "Sendr") == 1); SendClientMessage(playerid, RED, "You havent been sent a dm request!"); SetPVarInt(ID, "Sendr", GetPVarInt(ID, "Sendr")-1); SetPlayerPos(playerid,1532.3898,-1353.6200,329.4535); SetPlayerPos(ID,1555.9983,-1353.6331,329.4609); SendClientMessage(playerid,ORANGE,"You accepted! If you win type /kill to spawn back!"); SendClientMessage(ID,ORANGE,"He accepted! If you win type /kill to spawn back!"); return 1; }
Код:
dcmd_denie(const playerid,const params[]) { new ID = strval(params); if(ID == playerid) return SendClientMessage(playerid, RED, "You cannot denie yourself!"); SetPVarInt(ID, "Sendr", GetPVarInt(ID, "Sendr")+1); SendClientMessage(playerid,ORANGE,"You denied!"); SendClientMessage(ID,ORANGE,"He denied"); return 1; }