19.10.2014, 17:59
So hey guys, i've been looking for about an hour and a half trying to find a /spec <ID> which also turns spec off when you type /spec, i've got my old code for the spec, can anyone help me change it so i don't have to write /specoff ?
Here is the specoff code as well
EDIT: can yous also help me with a /mute <ID> <Minutes> <reason> command, i've been looking around and can't find one that works goodly
And can you help me with something what would i need to use to get the name of a player like /h <ID> <text> so when you do it, it says 'BlK(5): Playersname hey welcome to the server'
Код:
ACMD:spec(playerid, params[]) { new id; if (pInfo[playerid][Adminlevel] < 2) return 0; if(sscanf(params,"u", id))return SCM(playerid, -1, "--- /spec {33CCFF}<ID/Name> {FFFFFF}---"); if(id == INVALID_PLAYER_ID)return SCM(playerid, red, "Player not connected!"); GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]); Inter[playerid] = GetPlayerInterior(playerid); vWorld[playerid] = GetPlayerVirtualWorld(playerid); TogglePlayerSpectating(playerid, true); if(IsPlayerInAnyVehicle(id)) { if(GetPlayerInterior(id) > 0) { SetPlayerInterior(playerid,GetPlayerInterior(id)); } if(GetPlayerVirtualWorld(id) > 0) { SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id)); } PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id)); } else { if(GetPlayerInterior(id) > 0) { SetPlayerInterior(playerid,GetPlayerInterior(id)); } if(GetPlayerVirtualWorld(id) > 0) { SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id)); } PlayerSpectatePlayer(playerid,id); } GetPlayerName(id, Name, sizeof(Name)); format(String, sizeof(String),"{AFAFAF}[Admin]: {FFFFFF}You are spectating {33CCFF}%s.{FFFFFF}",Name); SCM(playerid, -1,String); IsSpecing[playerid] = 1; IsBeingSpeced[id] = 1; spectatorid[playerid] = id; return 1; }
Код:
ACMD:specoff(playerid, params[]) { if (pInfo[playerid][Adminlevel] < 2) return 0; TogglePlayerSpectating(playerid, 0); return 1; }
And can you help me with something what would i need to use to get the name of a player like /h <ID> <text> so when you do it, it says 'BlK(5): Playersname hey welcome to the server'