View Single Post
Old 30/08/2015, 07:23 AM   #15
Mariciuc223
Huge Clucker
 
Mariciuc223's Avatar
 
Join Date: Jul 2015
Location: Ganton
Posts: 261
Reputation: 11
Default Re: Jizzy Online Shop [Perfect Shop System]

So' , me again.

HTML Code:
stock ApplyPlayerAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0)
{
    ApplyAnimation(playerid, animlib, "null", fDelta, loop, lockx, locky, freeze, time, forcesync); // Pre-load animation library
    return ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);
}
stock PreloadAnimLib(playerid, animlib[])
{
	ApplyAnimation(playerid, animlib, "null", 0.0, 0, 0, 0, 0, 0);
	return 1;
}
to

HTML Code:
PreloadAnimLib(playerid, animlib[])
{
	ApplyAnimation(playerid, animlib, "null", 0.0, 0, 0, 0, 0, 0);
	return 1;
}
Because you don't need that 'ApplyPlayerAnimation' (because you didn't used it), and at 'PreloadAnimLib' use function , without stock , because stock :

Quote:
Originally Posted by Mariciuc223 View Post
Don't use anymore stocks, that are pretty useless. 'Stock' is used to declare variables and functions which may not be used but which you don't want to generate unused warnings for. With variables stock is like const in that it is a modifier, not a full declaration. That's good if you want to write a library and you don't want to get warnings if you don't used some functions from that 'include'. In rest you can use simple functions :

HTML Code:
Function( )
{
  // Do there something
}
Code:
C:\Users\Wipe\AppData\Local\Temp\Rar$DIa0.381\JShop.pwn(1076) : warning 203: symbol is never used: "PAttached"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
HTML Code:
enum PAttachedObjectPos
{
	Po_Mod,
	Po_Bond,
	Float:Po_X,
	Float:Po_Y,
	Float:Po_Z,
	Float:Po_RX,
	Float:Po_RY,
	Float:Po_RZ,
	Float:Po_SX,
	Float:Po_SY,
	Float:Po_SZ
}

new PAttached[MAX_PLAYERS][MAX_PLAYER_ATTACHED_OBJECTS][PAttachedObjectPos];
remove that.

Code:
new LastVehicleid=17;

// and down

CreateVehicle(402,X,Y,Z,A,-1,-1,60000);
PBoughtVehicle[playerid] = true;
PCreatedVehicleid[playerid] = LastVehicleid;
That 'LastVehicleid' suck ..

Code:
new VehicleID[MAX_PLAYERS] = INVALID_VEHICLE_ID;

// Down

VehicleID[playerid] = CreateVehicle(....);
And if you want to check if player have created vehicle:

Code:
if(VehicleID[playerid] != INVALID_VEHICLE_ID) // do something
On vehicle despawn , or you lose it:

Code:
VehicleID[playerid] = INVALID_VEHICLE_ID;
@Suggestion: You could add a command like /consume to consume that food or something , and to save the food he have ..
__________________
My work
___________________________
Vip System V.10 by Sweet (Wiper)
Simple Real Time Clock SA:MP |
[Tutorial] Initialisers
___________________________

If i helped you don't forget to press

Popcorn - A corn that sing pop music.
Mariciuc223 is offline   Reply With Quote