Help with varibles.. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with varibles.. (
/showthread.php?tid=435467)
Help with varibles.. -
Yaz94 - 07.05.2013
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";
}
Re: Help with varibles.. -
arakuta - 07.05.2013
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
Re: Help with varibles.. -
[ABK]Antonio - 07.05.2013
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.