Undefined symbol "playerid" .. :L - 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: Undefined symbol "playerid" .. :L (
/showthread.php?tid=164002)
Undefined symbol "playerid" .. :L -
WillyP - 29.07.2010
pawn Код:
public tunetimer()
{
PlayerPlaySound(playerid,1062,-3359.1,3008.2,1.7);
}
and i get a error, i have all the other neccasery things too:
pawn Код:
forward tunetimer();
and
SetTimer("tunetimer",5000,false);
and i have the a_samp included too...
Re: Undefined symbol "playerid" .. :L -
FireCat - 29.07.2010
try this :
Quote:
public tunetimer()
{
PlayerPlaySound(1062,-3359.1,3008.2,1.7);
}
|
if it dosnt work tell me
Re: Undefined symbol "playerid" .. :L -
WillyP - 29.07.2010
Quote:
Originally Posted by FireCat
try this :
if it dosnt work tell me
|
i get warnings, but thats about it
Re: Undefined symbol "playerid" .. :L -
WillyP - 29.07.2010
FIXED FIXED FIXED
Re: Undefined symbol "playerid" .. :L -
Code_Red - 29.07.2010
pawn Код:
public tunetimer(playerid)
{
PlayerPlaySound(playerid,1062,-3359.1,3008.2,1.7);
}
pawn Код:
forward tunetimer(playerid);
and
SetTimer("tunetimer",5000,false);
there
Re: Undefined symbol "playerid" .. :L -
smeti - 29.07.2010
(Favorite: )
pawn Код:
public
OnGameModeInit()
{
SetTimer("tunetimer", 5000, true);
return 1;
}
forward
tunetimer();
public
tunetimer()
{
// for(new i, g_m = GetMaxPlayers(); i < g_m; i++) if(IsPlayerConnected(i))
foreach(Player, i)
{
PlayerPlaySound(i, 1062, 0.0, 0.0, 0.0);
}
return 1;
}
Or:
(Alternative: )
pawn Код:
public
OnPlayerConnect(playerid)
{
SetPVarInt(playerid, "KillTimer", SetTimerEx("tunetimer", 5000, true, "d", playerid));
return true;
}
public
OnPlayerDisconnect(playerid)
{
KillTimer(GetPVarInt(playerid, "KillTimer"));
return true;
}
forward
tunetimer(playerid);
public
tunetimer(playerid)
{
PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
return 1;
}