Iulian
-
Posts
191 -
Joined
-
Last visited
Content Type
Profiles
Forums
News
Documentation
Posts posted by Iulian
-
-
[pawn]CMD:setname(playerid,params[])
{
if(PlayerInfo[playerid][Level] >= 3 || IsPlayerAdmin(playerid))
{
new tmp[256], tmp2[256];
if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, LIGHTBLUE2, "Usage: /setname [PlayerID] [NewName]");
SendClientMessage(playerid, orange, "Function: Will set Name of specified player!");
new player1 = strval(tmp);
new length = strlen(tmp2);
new string[128];
if(length < 3 || length > MAX_PLAYER_NAME) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
{
format(string, sizeof(string), "|- You have set \"%s's\" Name to \"%s\" -|", GetName(player1), tmp2);
SendClientMessage(playerid,BlueMsg,string);
if(player1 != playerid)
{
format(string,sizeof(string),"|- Administrator \"%s\" has set your Name to \"%s\" -|", GetName(playerid), tmp2);
SendClientMessage(player1,blue,string);
}
SetPlayerName(player1, tmp2);
return OnPlayerConnect(player1);
}
else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
}
else return SendClientMessage(playerid,red,"ERROR: You need to be admin level 3 to use this command");
}[/pawn]
Incearca asta.
Eject: (nu sunt sigur)
[pawn]CMD:eject(playerid,params[])
{
if(PlayerInfo[playerid][Level] >= 3)
{
new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid,orange,"Usage: /eject [playerid]");
new string[128];
if(IsPlayerInAnyVehicle(id))
{
if(id != playerid)
{
format(string,sizeof(string),"|- Administrator \"%s\" has Ejected you from your Vehicle -|", GetName(playerid));
SendClientMessage(id,blue,string);
}
format(string,sizeof(string)," |- You have ejected \"%s\" from their Vehicle -|", GetName(id));
SendClientMessage(playerid,BlueMsg,string);
new x,y,z;
GetPlayerPos(id, x, y, z);
z=z+3;
SetPlayerPos(id, x, y, z);
return 1;
}
else return SendClientMessage(playerid,red,"ERROR: Player is not in a vehicle");
}
else return ErrorMessages(playerid, 2);
}[/pawn]
-
Daca tot nu merge, adauga pluginul streamer, il gasesti cu un mic search pe google.
[pawn]#include <streamer>[/pawn]
-
La
[pawn]public OnPlayerConnect[/pawn]
adaugi
[pawn] new name[64], file[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Users/%s.ini",name);
GivePlayerMoney(playerid, dini_Int(file, "Money");[/pawn]
*Modifici ce am scris eu mai sus dupa serverul tau, daca pui exact ce ti-am dat eu s-ar putea sa iti dea niste erori
-
[pawn]CreatePickup(1212, 2, COORDONATA X, COORDONATA Y, COORDONATA Z, -1);[/pawn]
[pawn]SetTimer("PickupCheck", 1000, true);[/pawn]
[pawn]forward PickupCheck();
public PickupCheck()
{
for(new i=0;i<=MAX_PLAYERS;i++)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, COORDONATA X, COORDONATA Y, COORDONATA Z))
{
GivePlayerMoney(playerid, suma);
{
}
return 1;
}[/pawn]
Scriptul este facut pe loc, nu stiu daca va functiona din prima
-
[pawn]new Text3D:Faction[MAX_PLAYERS];[/pawn]
[pawn]SetTimer("SkinTextUpdate", 5000, true);[/pawn]
[pawn]forward SkinTextUpdate();
public SkinTextUpdate()
{
for(new i=0;i<=MAX_PLAYERS;i++)
{
DeletePlayer3DTextLabel(i, Text3D:Faction);
if(GetPlayerSkin(playerid) == SKIN || GetPlayerSkin(playerid) == SKIN || GetPlayerSkin(playerid) == SKIN) //SKIN = Skinurile Groove
{
Text3D:Faction = Create3DTextLabel("Groove", 0x00CC00FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(Text3D:Faction, i, 0.0, 0.0, 0.35);
}
else if(GetPlayerSkin(playerid) == SKIN || GetPlayerSkin(playerid) == SKIN || GetPlayerSkin(playerid) == SKIN) //SKIN = Skinurile Ballas
{
Text3D:Faction = Create3DTextLabel("Ballas", 0xCC33CCF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(Text3D:Faction, i, 0.0, 0.0, 0.35);
}
}
return 1;
}[/pawn]
E facut in graba, nu stiu daca iti va da erori sau nu, nu e testat.
-
Posteaza te rog si
[pawn]public OnPlayerDeath[/pawn]
-
Frumos Am sa o folosesc
-
Stie cineva ce as pute face?
-
Pai dupa ce se finalizeaza procesul de compilare al fisieului .pwn trebui sa apara si fisierul .amx , corect ? E la mine numai apare nu stiu de ce :-"
Iti da o eroare ceva?
Daca nu ai gresit ceva in GM, o paranteza. Verifica ultimele modificari si fii sigur ca nu ai uitat nici o paranteza sau altceva
-
Asta este un FS si are folder special. Datele din GM ale userului au un alt fisier
EDIT: Raspunde cineva?
-
Am creat un sistem de atasamente cu save/loading. Am pus ca atunci cand selecteaza stergere, sa stearga fisierul nume.ini (nume = numele playerului). Totul merge perfect pana cand intrii din nou si iti apare obiectul chiar daca fisierul .ini nu exista.
STERGEREA FISIERULUI:
[pawn]RemoveHats(playerid)
{
new Name[24], file[50];
GetPlayerName( playerid, Name, sizeof Name );
format( file, sizeof file, "accesorii/%s.ini", Name );
fremove( file );
return 1;
}[/pawn]
INCARCAREA OBIECTELOR:
[pawn]forward LoadToys(playerid,name[],value[]);
public LoadToys(playerid,name[],value[])
{
if (!strcmp(name, "sindex")){ PlayerInfo[playerid][pindex] = strval(value); }
if (!strcmp(name, "pmodelid")){ PlayerInfo[playerid][pmodelid] = strval(value); }
if (!strcmp(name, "pboneid")){ PlayerInfo[playerid][pboneid] = 2; }
if (!strcmp(name, "pfOffsetX")){ PlayerInfo[playerid][pfOffsetX] = strval(value); }
if (!strcmp(name, "pfOffsetY")){ PlayerInfo[playerid][pfOffsetY] = strval(value); }
if (!strcmp(name, "pfOffsetY")){ PlayerInfo[playerid][pfOffsetZ] = strval(value); }
if (!strcmp(name, "pfRotX")){ PlayerInfo[playerid][pfRotX] = strval(value); }
if (!strcmp(name, "pfRotY")){ PlayerInfo[playerid][pfRotY] = strval(value); }
if (!strcmp(name, "pfRotZ")){ PlayerInfo[playerid][pfRotZ] = strval(value); }
if (!strcmp(name, "pfScaleX")){ PlayerInfo[playerid][pfScaleX] = strval(value); }
if (!strcmp(name, "pfScaleY")){ PlayerInfo[playerid][pfScaleY] = strval(value); }
if (!strcmp(name, "pfScaleZ")){ PlayerInfo[playerid][pfScaleZ] = strval(value); }
INI_Int("pindex",PlayerInfo[playerid][pindex]);
INI_Int("pmodelid",PlayerInfo[playerid][pmodelid]);
INI_Int("pboneid",PlayerInfo[playerid][pboneid]);
INI_Float("pfOffsetX",PlayerInfo[playerid][pfOffsetX]);
INI_Float("pfOffsetY",PlayerInfo[playerid][pfOffsetY]);
INI_Float("pfOffsetZ",PlayerInfo[playerid][pfOffsetZ]);
INI_Float("pfRotX",PlayerInfo[playerid][pfRotX]);
INI_Float("pfRotY",PlayerInfo[playerid][pfRotY]);
INI_Float("pfRotZ",PlayerInfo[playerid][pfRotZ]);
INI_Float("pfScaleX",PlayerInfo[playerid][pfScaleX]);
INI_Float("pfScaleY",PlayerInfo[playerid][pfScaleY]);
INI_Float("pfScaleZ",PlayerInfo[playerid][pfScaleZ]);
return 1;
}[/pawn]
-
Salut, tocmai ce am terminat un sistem de atasamente (palarii,sepci) cu tot cu save si am o intrebare/problema. Problema este ca atunci cand dau remove la obeict nu mi se salveaza in fisier (am dat sa modifice id-ul atasamentului in 0). Intrebarea este daca pot face sa stearga fisierul (Nume.ini ~ Nume= numele playerului) folosint YSI\y_ini?
-
E filerscript, dar am rezolvat. Trebuia scos INT:
-
Raspunde cineva?
-
Am luat un script de AICI
si cand sa compilez am warningurile astea
[pawn]C:\Users\Iuly\Desktop\samp03x_svr_R1-2_win32\filterscripts\toys.pwn(257 -- 258) : warning 213: tag mismatch
C:\Users\Iuly\Desktop\samp03x_svr_R1-2_win32\filterscripts\toys.pwn(257 -- 259) : warning 213: tag mismatch
C:\Users\Iuly\Desktop\samp03x_svr_R1-2_win32\filterscripts\toys.pwn(257 -- 260) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.[/pawn]
La randurile cu INT
[pawn]OnPlayerLogin(playerid)
{
new uFile[35];
format(uFile, 35, PATH, GetName(playerid));
INI_ParseFile(uFile, "LoadToys", .bExtra = true, .extra = playerid);
SetPlayerAttachedObject(playerid,
INT:PlayerInfo[playerid][pindex],
INT:PlayerInfo[playerid][pmodelid],
INT:PlayerInfo[playerid][pboneid],
Float:PlayerInfo[playerid][pfOffsetX],
Float:PlayerInfo[playerid][pfOffsetY],
Float:PlayerInfo[playerid][pfOffsetZ],
Float:PlayerInfo[playerid][pfRotX],
Float:PlayerInfo[playerid][pfRotY],
Float:PlayerInfo[playerid][pfRotZ],
Float:PlayerInfo[playerid][pfScaleX],
Float:PlayerInfo[playerid][pfScaleY],
Float:PlayerInfo[playerid][pfScaleZ]);
return 1;
}[/pawn]
-
Merci +1
-
Salut, am inceput un sistem de palarii/sepci etc. si mi-a dat destule erori. le-am rezolvat pe toate dar una imi da batai de cap
EROARE:
[pawn]C:\Users\Iuly\Downloads\Testing Server\filterscripts\accesorii.pwn(91) : error 030: compound statement not closed at the end of file (started at line 52)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
[/pawn]
SCRIPT:
[pawn]//Linia 52
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_ACCESORII)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, DIALOG_ADAUGA,DIALOG_STYLE_LIST,"Alege modelul","Model 1 \nModel 2","Selecteaza","Aluneaza");
}
if(listitem == 1)
{
EditAttachedObject(playerid, 1);
SendClientMessage(playerid, 0xFFFFFFFF, "[Testing Server]: ~g~Modifica ~r~palaria/sapca !");
}
if(listitem == 2)
{
for ( new i = 0; i < 5; i ++ )
if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) )
RemovePlayerAttachedObject( playerid, i );
}
return 0;
}
if(dialogid == DIALOG_ADAUGA)
{
if(response)
{
if(listitem == 0)
{
SetPlayerAttachedObject( playerid, 1, 18891, 2, 0.094485, 0.007215, 0.0, 0.000000, 0.000000, 0.000000, 1.200000, 1.200000, 1.200000 );
EditAttachedObject(playerid, 1);
}
if(listitem == 1)
{
SetPlayerAttachedObject( playerid, 1, 18891, 2, 0.094485, 0.007215, 0.0, 0.000000, 0.000000, 0.000000, 1.200000, 1.200000, 1.200000 );
EditAttachedObject(playerid, 1);
}
}
return 0;
}[/pawn]
EDIT: Am un warning si la ultimul return. loose indentation, l-am invartit in toate felurile si la fel
-
[pawn]#include <Double-O-Files>
#include <ForEachPlayer>
#include <zcmd>
[/pawn]
adica astea in Gm si FS nu ? Junk Buster mai are include a_samp dar ala este peste tot :-j
EDIT:
AM incercat sa pun includeurile si imi da asta:
[pawn]C:\Users\Iuly\Desktop\Desk\SAMP\Viata Virtuala v1.0\gamemodes\ViataVirtualaRP-LS.pwn(14020) : error 021: symbol already defined: "strtok"
C:\Users\Iuly\Desktop\Desk\SAMP\Viata Virtuala v1.0\gamemodes\ViataVirtualaRP-LS.pwn(14035) : error 047: array sizes do not match, or destination array is too small
C:\Users\Iuly\Desktop\Desk\SAMP\Viata Virtuala v1.0\gamemodes\ViataVirtualaRP-LS.pwn(19764) : error 047: array sizes do not match, or destination array is too small
C:\Users\Iuly\Desktop\Desk\SAMP\Viata Virtuala v1.0\gamemodes\ViataVirtualaRP-LS.pwn(24199) : warning 219: local variable "mod" shadows a variable at a preceding level
C:\Users\Iuly\Desktop\Desk\SAMP\Viata Virtuala v1.0\gamemodes\ViataVirtualaRP-LS.pwn(56473) : warning 203: symbol is never used: "CreatedCar"
C:\Users\Iuly\Desktop\Desk\SAMP\Viata Virtuala v1.0\gamemodes\ViataVirtualaRP-LS.pwn(56473) : warning 203: symbol is never used: "DOF_Exit"
C:\Users\Iuly\Desktop\Desk\SAMP\Viata Virtuala v1.0\gamemodes\ViataVirtualaRP-LS.pwn(56473) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
C:\Users\Iuly\Desktop\Desk\SAMP\Viata Virtuala v1.0\gamemodes\ViataVirtualaRP-LS.pwn(56473) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
[/pawn]
Acele include-uri le am in pawno cu care compilez.. Ce sa fac?
-
Adica sa pun #include ?
-
Nu.. atunci imi dati un anti-cheat bun? va rooog!
-
Am incercat si tot isi dau bani playerii:@
Sa moara inecati in lava aia care au creat hackuri pt samp:@
-
Am o problema la Anti-Cheatul JUNKBUSTER.. De fiecare data cand imi dau bani sau cand un jucator are bani ii seteaza automat banii la 0.. Acesta este configul :
[pawn]WeaponHack=1
MoneyHack=1
Jetpack=1
HealthHack=0
ArmourHack=0
DriveBy=2
Spam=1
CommandSpam=4
BadWords=1
CarJackHack=1
TeleportHack=1
MaxPing=800
SpectateHack=0
Blacklist=1
IpBans=1
TempBans=1
SpawnKill=3
CapsLock=0
3DSpeed=0
MaxSpeed=220
AdminImmunity=1
Advertisement=1
FreezeUpdate=0
SpawnTime=10
CheckpointTeleport=1
Airbreak=1
TankMode=1
WarnPlayers=0
SingleplayerCheats=1
MinFPS=13
DisableBadWeapons=1
CBug=16
AntiBugKill=1
NoReload=20
NoReloadForSawnOff=4
ActiveGMC=2
GMCBan=0
ServerSideHealth=1
CheckVMPos=0
QuickTurn=1
[/pawn]
Vreau sa am si anti money hack.. ce pot face?
-
Ti-am trimis mesaj privat :)
-
Scoate acele 2 bare si da-mi randul acela..
Ajutor /jail
in Arhivă probleme
Posted
[pawn]if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage( playerid, -1, "Nu poti folosi comenzi in timp ce esti la inchisoare." );[/pawn]
Ar trebui sa mearga
PS:NexT, tu ai pus la OnPlayerCommandPerformed player1, si trebuia playerid!