[PROBLEM]Weird Trouble with 2 codes - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [PROBLEM]Weird Trouble with 2 codes (
/showthread.php?tid=177699)
[PROBLEM]Weird Trouble with 2 codes -
nepstep - 19.09.2010
Hello guys, i am recently scripting a gamemode, but now i am having some trouble..
i have an include which contains:
//CODE No1
pawn Код:
stock IsPlayerRegistered(playerid)
{
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name));
new file[256], tmp;
format(file,256,"users/%s.sav",udb_encode(name));
tmp = dini_Int(file,"registered");
if( (IsPlayerConnected(playerid)) && (tmp == 1))
return true;
else return false;
}
so this working fine:
pawn Код:
if(IsPlayerRegistered(playerid))
{
//
}
but when i add in my gamemode these code to make some teamnames :
//CODE No2
pawn Код:
new fstn[256];
format(fstn,sizeof(fstn),"[Gangster]%s", playername(playerid) );
SetPlayerName(playerid,fstn);
djSet(fstt,"player/TeamName",fstn);
no one of the codes are working,
when i am removing the CODE No1 , the code No2 working..
when i am removing CODE No2, code No1 working...
but i want to get both codes working!
please do not offer me other ways to make teamnames, just help me to solve this weird problem...
thanks
PS: Pawn has no warnings/errors , its clean on combile..
PS.2:Sorry for my bad english
Re: [PROBLEM]Weird Trouble with 2 codes -
nepstep - 19.09.2010
bump
sorry for bumping so early but i have to fix this fast..
Re: [PROBLEM]Weird Trouble with 2 codes -
MadeMan - 19.09.2010
What do you mean "not working" ?
Re: [PROBLEM]Weird Trouble with 2 codes -
nepstep - 19.09.2010
Quote:
Originally Posted by MadeMan
What do you mean "not working" ?
|
i mean not working,
for example if i have a command wich send a message when the player is registered, if are the both codes on the script then the command do nothing..
but if i remove the code No2 then the command working fine...
and if i remove the code No1 then something wich use the code No2 is working fine...