Help with varibles..
#1

My thread got deleted..

I don't think you're understanding what I am trying to do..
I will explain exactly now.

if(gTeam[playerid] == TEAM_COP && GetPlayerSkin(playerid) != 286)
{
Not sure what to put here
}
if(gTeam[playerid] == TEAM_RAPIST)
{
Not sure what to put here
}
format(string,sizeof(string),"%s", skill);
TextDrawSetString(SkillTD,string);

IN PHP IT WOULD LOOK SOMETHING LIKE THIS
if(gTeam[playerid] == TEAM_COP && GetPlayerSkin(playerid) != 286)
{
$skill = "Cop";
}
if(gTeam[playerid] == TEAM_RAPIST)
{
$skill = "Rapist";
}
Reply
#2

I guess beacuse you should put pawn codes between [pawn][*/pawn] tags.

https://sampwiki.blast.hk/wiki/Control_Structures

https://sampwiki.blast.hk/wiki/Scripting_Basics#Variables
Reply
#3

Quote:
Originally Posted by Yaz94
Посмотреть сообщение
My thread got deleted..

I don't think you're understanding what I am trying to do..
I will explain exactly now.

if(gTeam[playerid] == TEAM_COP && GetPlayerSkin(playerid) != 286)
{
Not sure what to put here
}
if(gTeam[playerid] == TEAM_RAPIST)
{
Not sure what to put here
}
format(string,sizeof(string),"%s", skill);
TextDrawSetString(SkillTD,string);

IN PHP IT WOULD LOOK SOMETHING LIKE THIS
if(gTeam[playerid] == TEAM_COP && GetPlayerSkin(playerid) != 286)
{
$skill = "Cop";
}
if(gTeam[playerid] == TEAM_RAPIST)
{
$skill = "Rapist";
}
Why would you want to create another variable that isn't needed? You already have gTeam which can determine what job/skill they have.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)