09.04.2010, 18:00
Now compile, more ta same thing as before no ta saving positions, weapons, and money, I do not know how to resolve this problema.Mais Thanks for the help and willingness to help me.
It was so:
Thanks anyway Mастерминд
It was so:
Код:
dcmd_spec(playerid,params[]) { if(IsPlayerCommandLevel(playerid,"spec")) { if(!strlen(params)) return SendClientMessage(playerid,red,"[ERROR]: \"/SPEC <NICK OR ID | OFF>\"."); new id; if(!IsNumeric(params)) { if(!strcmp(params,"off",true)) { if(!Spec[playerid][Spectating]) return SendClientMessage(playerid,red,"[ERROR]: You should be watchful."); SendCommandMessageToAdmins(playerid,"SPEC OFF"); TogglePlayerSpectating(playerid,false); Spec[playerid][Spectating] = false; return SendClientMessage(playerid,yellow,"You left the observer mode."); } id = ReturnPlayerID(params); } else id = strval(params); if(IsPlayerConnected(id) && id != INVALID_PLAYER_ID && id != playerid) { SendCommandMessageToAdmins(playerid,"SPEC"); new string[256],name[24]; GetPlayerName(id,name,24); if(Spec[id][Spectating]) return SendClientMessage(playerid,red,"Error: You may not notice a player ever observed."); if(Spec[playerid][Spectating] && Spec[playerid][SpectateID] == id) return SendClientMessage(playerid,red,"[ERROR]:You're already watching this player."); Spec[playerid][Spectating] = true, Spec[playerid][SpectateID] = id; SetPlayerInterior(playerid,GetPlayerInterior(id)); for(new i; i < 13; i++) GetPlayerWeaponData(playerid, i, WeapData[playerid][0][i], WeapData[playerid][1][i]); GetPlayerPos(playerid, LastData[playerid][posx], LastData[playerid][posy], LastData[playerid][posz]); LastData[playerid][sinterior] = GetPlayerInterior(playerid); LastData[playerid][smoney] = GetPlayerMoney(playerid); TogglePlayerSpectating(playerid,true); if(!IsPlayerInAnyVehicle(id)) PlayerSpectatePlayer(playerid,id); else PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id)); format(string,256,"You are now watching the player \"%s\".",name); return SendClientMessage(playerid,yellow,string); } else return SendClientMessage(playerid,red,"[ERROR]: You may not notice yourself or a disconnected player."); } else return SendLevelErrorMessage(playerid,"spec"); }