How to name someting
#1

Hello!
I wanna make if
PHP Code:
PlayerInfo[playerid][pJob
is == 1
then when i use command /stats
PHP Code:
CMD:stats(playerid)
{
    new 
string[258],name[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,name,sizeof(name));
    
format(string,sizeof(string),"Numele: %s | Bani in mana: %i | Admin Level: %i | Job: %s",nameGetPlayerMoney(playerid), PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pJob]);
    
SendClientMessage(playerid,-1,string);
    return 
1;

Exemple: PlayerInfo[playerid][pJob] = 1 ; that job is fisherman
and in /stats at Job: %s to show 'Fisherman' not '1'.
Reply
#2

PHP Code:
new jobtext[8];
    if(
PlayerInfo[playerid][pJob] == JOBID) { jobtext"JOB INFO"; }
    else if(
PlayerInfo[playerid][pJob] == JOBID) { jobtext"JOB INFO"; } 
Example,

PHP Code:
new jobtext[8];
    if(
PlayerInfo[playerid][pJob] == 1) { jobtext"Fisherman"; } 
PHP Code:
format(string,sizeof(string),"Numele: %s | Bani in mana: %i | Admin Level: %i | Job: %s",nameGetPlayerMoney(playerid), PlayerInfo[playerid][pAdmin], jobtext); 
Reply
#3

Quote:
Originally Posted by David (Sabljak)
View Post
PHP Code:
new jobtext[8];
    if(
PlayerInfo[playerid][pJob] == JOBID) { jobtext"JOB INFO"; }
    else if(
PlayerInfo[playerid][pJob] == JOBID) { jobtext"JOB INFO"; } 
Example,

PHP Code:
new jobtext[8];
    if(
PlayerInfo[playerid][pJob] == 1) { jobtext"Fisherman"; } 
PHP Code:
format(string,sizeof(string),"Numele: %s | Bani in mana: %i | Admin Level: %i | Job: %s",nameGetPlayerMoney(playerid), PlayerInfo[playerid][pAdmin], jobtext); 
And how to make
PlayerInfo[playerid][pJob] == 1; When is type getjob because is say in console that is not work
Reply
#4

Code:
CMD:getjob(playerid)
{
if(PlayerInfo[playerid][pJob] == 1)  return SendClientMessage(playerid, -1, "You are already in fisherman job");

return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)