"DestroyPlayerObject" - 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: "DestroyPlayerObject" (
/showthread.php?tid=326105)
"DestroyPlayerObject" -
Guitar - 16.03.2012
Hello, I have this " Streaming DestroyPlayerObject stock, and I don't know how to make it for
A Player not for all players. So, instead of DestroyObject, I wanna make it DestroyPlayerObjectEx <--- I have this code:
pawn Code:
stock DestroyPlayerObjectEx(playerid, ObjectId)
{
ObjectUsed[ObjectId] = 0;
for(new i; i<MAX_PLAYERS; i++)
{
if(ObjectStreamed[i][ObjectId] == 1)
{
ObjectStreamed[i][ObjectId] = 0;
DestroyPlayerObject(i, ObjectIDS[i][ObjectId]);
}
}
}
But I don't really know how to make the "playerid" work because when I use it it says, playerid was never used. So how can it be done?
Re: "DestroyPlayerObject" - T0pAz - 16.03.2012
pawn Code:
stock DestroyPlayerObjectEx( playerid, ObjectId )
{
ObjectUsed[ObjectId] = 0;
if ( ObjectStreamed[playerid][ObjectId] )
{
ObjectStreamed[playerid][ObjectId] = 0;
DestroyPlayerObject( playerid, ObjectIDS[playerid][ObjectId] );
}
}
Try this one maybe.
Re: "DestroyPlayerObject" -
Guitar - 16.03.2012
Yeah. How did not I do that, I ain't no perfect, damn. Thanks buddy.