SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Romānă/Romanian

Reply
 
Thread Tools Display Modes
Old 17/06/2016, 12:31 PM   #1
Calinut200
Little Clucker
 
Join Date: Jun 2016
Posts: 32
Reputation: 0
Default Ajutor la comanda /getjobc

Am o comanda /getjobc si vreau sa ii schimbe din job 0 in job 1.
Am incercat cu pInfo[playerid][pJob]=1;
dar nu se schimba in folderul user/job=0

PHP Code:
CMD:getjobc(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid,4,589.7928,870.6724,-42.4973))
    {
    
SendClientMessage(playerid,-1,"{FF0000}INFO:{FFFFFF}Acuma esti muncitor la cariera");
    
PlayerInfo[playerid][pJob] = 1;
    }
    else 
SendClientMessage(playerid, -1"{FF0000}INFO:{FFFFFF}Nu esti in locul potrivit,ti-am setat un checkpoint catre job.");
    
SetPlayerCheckpoint(playerid,589.7928,870.6724,-42.4973,3.0);
    
onjobc[playerid] = true;
    return 
1;

Calinut200 is offline   Reply With Quote
Old 17/06/2016, 01:41 PM   #2
Lumineux
Huge Clucker
 
Lumineux's Avatar
 
Join Date: Apr 2013
Location: Romania, Prahova
Posts: 243
Reputation: 2
Default Re: Ajutor!!

Arata-ne functia care salveaza datele jucatorilor... "SavePlayerData" sau ceva asemanator.
Lumineux is offline   Reply With Quote
Old 17/06/2016, 03:45 PM   #3
Calinut200
Little Clucker
 
Join Date: Jun 2016
Posts: 32
Reputation: 0
Default Re: Ajutor!!

PHP Code:
enum pInfo
{
    
pPass,
    
pCash,
    
pAdmin,
    
pSkin,
    
pScore,
    
pJob
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];
//===================== P I C K U P ============================//
new pickup;
//===================== F O R W A R D ==========================//
forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Password",PlayerInfo[playerid][pPass]);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Score",PlayerInfo[playerid][pScore]);
    
INI_Int("Skin",PlayerInfo[playerid][pSkin]);
    
INI_Int("Job",PlayerInfo[playerid][pJob]);
    return 
1;

Quote:
Originally Posted by Lumineux View Post
Arata-ne functia care salveaza datele jucatorilor... "SavePlayerData" sau ceva asemanator.
Calinut200 is offline   Reply With Quote
Old 17/06/2016, 04:31 PM   #4
shiftlol
Banned
 
Join Date: Dec 2014
Location: Republic of Moldova
Posts: 43
Reputation: 2
Default Re: Ajutor la comanda /getjobc

Quote:
Originally Posted by Calinut200 View Post
Am o comanda /getjobc si vreau sa ii schimbe din job 0 in job 1.
Am incercat cu pInfo[playerid][pJob]=1;
dar nu se schimba in folderul user/job=0

PHP Code:
CMD:getjobc(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid,4,589.7928,870.6724,-42.4973))
    {
    
SendClientMessage(playerid,-1,"{FF0000}INFO:{FFFFFF}Acuma esti muncitor la cariera");
    
PlayerInfo[playerid][pJob] = 1;
    }
    else 
SendClientMessage(playerid, -1"{FF0000}INFO:{FFFFFF}Nu esti in locul potrivit,ti-am setat un checkpoint catre job.");
    
SetPlayerCheckpoint(playerid,589.7928,870.6724,-42.4973,3.0);
    
onjobc[playerid] = true;
    return 
1;

CMD:getjobc(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,4,589.7928,870. 6724,-42.4973))
{
SendClientMessage(playerid,-1,"{FF0000}INFO:{FFFFFF}Acuma esti muncitor la cariera");
PlayerInfo[playerid][pJob] = 1;
}
else SendClientMessage(playerid, -1, "{FF0000}INFO:{FFFFFF}Nu esti in locul potrivit,ti-am setat un checkpoint catre job.");
SetPlayerCheckpoint(playerid,589.7928,870.6724,-42.4973,3.0);
onjobc[playerid] = true;
new INI:PlayerFile = INI_Open(aici puneti adresa catre fisier al acestui player);
INI_WriteInt(PlayerFile,"Job",PlayerInfo[playerid][pJob]);
INI_Close(PlayerFile);
return 1;
}
shiftlol is offline   Reply With Quote
Old 17/06/2016, 04:37 PM   #5
Calinut200
Little Clucker
 
Join Date: Jun 2016
Posts: 32
Reputation: 0
Default Re: Ajutor la comanda /getjobc

Am scris asa
new INI:PlayerFile = INI_Open"LoadUser_%s";
INI_WriteInt(PlayerFile,"Job",PlayerInfo[playerid][pJob]);
INI_Close(PlayerFile);
dar da niste erori


C:\Users\Calinut200\Desktop\MY serever\gamemodes\RPG.pwn(205) : error 076: syntax error in the expression, or invalid function call
Calinut200 is offline   Reply With Quote
Old 17/06/2016, 04:46 PM   #6
shiftlol
Banned
 
Join Date: Dec 2014
Location: Republic of Moldova
Posts: 43
Reputation: 2
Default Re: Ajutor la comanda /getjobc

Quote:
Originally Posted by Calinut200 View Post
Ceva de genu?new INI:PlayerFile = INI_Open"LoadUser_%s"; sau in paranteze?
pai uitativa unde se salveaza toti playerii
de exemplu:



new string[128],playerName[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
format(string,sizeof(string),"scriptfiles/ladmin/users/%s.sav",playerName);
new INI:PlayerFile = INI_Open(string);
shiftlol is offline   Reply With Quote
Old 17/06/2016, 04:48 PM   #7
shiftlol
Banned
 
Join Date: Dec 2014
Location: Republic of Moldova
Posts: 43
Reputation: 2
Default Re: Ajutor la comanda /getjobc

Quote:
Originally Posted by Calinut200 View Post
Am scris asa
new INI:PlayerFile = INI_Open"LoadUser_%s";
INI_WriteInt(PlayerFile,"Job",PlayerInfo[playerid][pJob]);
INI_Close(PlayerFile);
dar da niste erori


C:\Users\Calinut200\Desktop\MY serever\gamemodes\RPG.pwn(205) : error 076: syntax error in the expression, or invalid function call
ma asa ceva nu exista! INI_Open"LoadUser_%s";
shiftlol is offline   Reply With Quote
Old 17/06/2016, 05:06 PM   #8
Calinut200
Little Clucker
 
Join Date: Jun 2016
Posts: 32
Reputation: 0
Default Re: Ajutor la comanda /getjobc

Quote:
Originally Posted by shiftlol View Post
ma asa ceva nu exista! INI_Open"LoadUser_%s";


am facut dupa exemplu asta e codu
PHP Code:
CMD:getjobc(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid,4,589.7928,870.6724,-42.4973))
    {
    new 
string[128],playerName[MAX_PLAYER_NAME+1];
    
GetPlayerName(playeridplayerNameMAX_PLAYER_NAME);
    
format(string,sizeof(string),"scriptfiles/Users/%s.ini",playerName);
    new 
INI:PlayerFile INI_Open(string);
    
INI_WriteInt(PlayerFile,"Job",PlayerInfo[playerid][pJob]);
    
INI_Close(PlayerFile);
    
PlayerInfo[playerid][pJob] = 1;
    
SendClientMessage(playerid,-1,"{FF0000}INFO:{FFFFFF}Acuma esti muncitor la cariera");
    }
    else 
SendClientMessage(playerid, -1"{FF0000}INFO:{FFFFFF}Nu esti in locul potrivit,ti-am setat un checkpoint catre job.");
    
SetPlayerCheckpoint(playerid,589.7928,870.6724,-42.4973,3.0);
    
onjobc[playerid] = true;
    return 
1;


dar nu merge
Calinut200 is offline   Reply With Quote
Old 17/06/2016, 05:08 PM   #9
shiftlol
Banned
 
Join Date: Dec 2014
Location: Republic of Moldova
Posts: 43
Reputation: 2
Default Re: Ajutor la comanda /getjobc

Quote:
Originally Posted by Calinut200 View Post
am facut dupa exemplu asta e codu
PHP Code:
CMD:getjobc(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid,4,589.7928,870.6724,-42.4973))
    {
    new 
string[128],playerName[MAX_PLAYER_NAME+1];
    
GetPlayerName(playeridplayerNameMAX_PLAYER_NAME);
    
format(string,sizeof(string),"scriptfiles/Users/%s.ini",playerName);
    new 
INI:PlayerFile INI_Open(string);
    
INI_WriteInt(PlayerFile,"Job",PlayerInfo[playerid][pJob]);
    
INI_Close(PlayerFile);
    
PlayerInfo[playerid][pJob] = 1;
    
SendClientMessage(playerid,-1,"{FF0000}INFO:{FFFFFF}Acuma esti muncitor la cariera");
    }
    else 
SendClientMessage(playerid, -1"{FF0000}INFO:{FFFFFF}Nu esti in locul potrivit,ti-am setat un checkpoint catre job.");
    
SetPlayerCheckpoint(playerid,589.7928,870.6724,-42.4973,3.0);
    
onjobc[playerid] = true;
    return 
1;


dar nu merge
da mie modul eu voi scrie!
shiftlol is offline   Reply With Quote
Old 17/06/2016, 05:18 PM   #10
Calinut200
Little Clucker
 
Join Date: Jun 2016
Posts: 32
Reputation: 0
Default Re: Ajutor la comanda /getjobc

Quote:
Originally Posted by shiftlol View Post
da mie modul eu voi scrie!
CE mod?Gamemode-ul?
Calinut200 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ajutor war CePaX Romānă/Romanian 2 30/10/2012 11:32 AM
Ajutor! xSkullx Romānă/Romanian 2 14/07/2012 06:49 PM
Ajutor g2bytzzu Romānă/Romanian 0 14/07/2012 05:40 PM
Ajutor .. :(( ArCxD Romānă/Romanian 7 15/05/2012 09:13 PM


All times are GMT. The time now is 06:40 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.