20.11.2017, 19:00
PHP Code:
#define DIALOG_COOKIE 1
PHP Code:
enum CookieInfo
{
Cookies,
RLevel
}
new cInfo[MAX_PLAYERS][CookieInfo];
PHP Code:
new cInfo[MAX_PLAYERS][2];
PHP Code:
stock Path(playerid)
{
new str[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(str,sizeof(str),UserPath,name);
return str;
}
PHP Code:
stock GetName(playerid)
{
new name[24];
GetPlayerName(playerid,name,24);
return name;
}
PHP Code:
stock NotAuthorized(playerid)
{
SendClientMessage(playerid, COLOR_GREY, "You don't have permission to use this command.");
}
PHP Code:
stock PlayerName(playerid)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
return pname;
}
PHP Code:
SetPlayerHealth(playerid, 99.00);
and
SetPlayerArmour(playerid, 99.00);
PHP Code:
GivePlayerWeapon(playerid, 34, 100);
GivePlayerWeapon(playerid, 29, 300);
GivePlayerWeapon(playerid, 31, 200);
PHP Code:
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreateVehicle(522, X+4, Y, Z, 82.2873, -1, -1, 60);
You're also setting the angle to 82.2-.. Why not use GetPlayerFacing Angle?
Also, last but not least, you're not checking whether the player is in a virtual world, interior or w/e.
(look up PutPlayerInVehicle as well)
PHP Code:
CMD:rewarderhelp(playerid,params[])
{
if(cInfo[playerid][RLevel] == 1)
{
SendClientMessage(playerid, COLOR_LB,"Junior Rewarder : /givecookie - /givecookieall - /rewardrehelp");
}
if(cInfo[playerid][RLevel] == 2)
{
SendClientMessage(playerid, COLOR_LB,"Junior Rewarder : /givecookie - /giveallcookie - /rewardrehelp");
SendClientMessage(playerid, COLOR_LB,"General Rewarder : /setcookies");
}
if(cInfo[playerid][RLevel] == 3 || (IsPlayerAdmin(playerid)))
{
SendClientMessage(playerid, COLOR_LB,"Junior Rewarder : /givecookie - /givecookieall - /rewardrehelp");
SendClientMessage(playerid, COLOR_LB,"General Rewarder : /setcookies");
SendClientMessage(playerid, COLOR_LB,"Head Rewarder : /makerewarder");
}
else
{
NotAuthorized(playerid);
}
return 1;
}
PHP Code:
if(level > 3 || level < 0)
PHP Code:
if(0 < level > 3)
PHP Code:
if (level == 0) return SendClientMessage(targetid, COLOR_LB,"You have beeen fired from your position as a rewarder");
if (level == 1) return SendClientMessage(targetid, COLOR_LB,"You have been set as a Junior Rewarder");
if (level == 2) return SendClientMessage(targetid, COLOR_LB,"You have been set as a General Rewarder");
if (level == 3) return SendClientMessage(targetid, COLOR_LB,"You have been set as a Head Rewarder");
Code is not well-looking at all, try fixing it and making the filterscript useful(being the keyword here) and release it again.