public OnPlayerSpawn(playerid)
{
TextDrawShowForAll(discord[0]);
TextDrawShowForAll(discord[1]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerInterior(playerid, 0);
TogglePlayerClock(playerid, 0);
ResetPlayerWeapons(playerid);
new Skin = GetPlayerSkin(playerid);
switch(Skin)
{
case 102,104:
{
SetPlayerTeam(playerid, BALLAS);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 25, 200);
GivePlayerWeapon(playerid, 28, 200);
GivePlayerWeapon(playerid, 34, 200);
GivePlayerWeapon(playerid, 30, 200);
SetPlayerPos(playerid, -2569.7415, 892.6765, 64.9844);
}
case 106,107:
{
SetPlayerTeam(playerid, GROVE);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 25, 200);
GivePlayerWeapon(playerid, 32, 200);
GivePlayerWeapon(playerid, 34, 200);
GivePlayerWeapon(playerid, 31, 200);
SetPlayerPos(playerid, -1704.2889, 1018.0909, 17.5859);
}
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0)
{
SetPlayerSkin(playerid, 102);
GameTextForPlayer(playerid, "~p~Ballas", 1000, 4);
SetPlayerColor(playerid, COLOR_PURPLE);
gTeam[playerid] = 0;
}
if(classid == 1)
{
SetPlayerSkin(playerid, 104);
GameTextForPlayer(playerid, "~p~Ballas", 1000, 4);
SetPlayerColor(playerid, COLOR_PURPLE);
gTeam[playerid] = 0;
}
if(classid == 2)
{
SetPlayerSkin(playerid, 106);
GameTextForPlayer(playerid, "~g~Grove", 1000, 4);
SetPlayerColor(playerid, COLOR_GREEN);
gTeam[playerid] = 1;
}
if(classid == 3)
{
SetPlayerSkin(playerid, 107);
GameTextForPlayer(playerid, "~g~Grove", 1000, 4);
SetPlayerColor(playerid, COLOR_GREEN);
gTeam[playerid] = 1;
}
SetupPlayerForClassSelection(playerid);
return 1;
}
CMD:skin(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You're not allowed to use this command");
new skinnumber, skinid, string[128];
if(sscanf(params, "d", skinid)) SendClientMessage(playerid, COLOR_WHITE, "{FF6600}Usage: {FFFFFF}/skin [0-299]");
else if(skinid < 0 || skinid > 299) SendClientMessage(playerid, COLOR_RED, "Invalid skin ID, Select skin from {AFAFAF}[0-299]");
else
{
SetPlayerSkin(playerid, skinid);
skinnumber = GetPlayerSkin(playerid);
format(string, sizeof(string), "You have changed your skin to {AFAFAF}%d", skinnumber);
SendClientMessage(playerid, COLOR_ORANGE, string);
}
return 1;
}
PHP код:
|
C:\Users\DeStRoY\Downloads\Compressed\My Gamemode\pawno\include\cnr/commands.inc(44) : warning 217: loose indentation C:\Users\DeStRoY\Downloads\Compressed\My Gamemode\pawno\include\cnr/commands.inc(45) : warning 217: loose indentation C:\Users\DeStRoY\Downloads\Compressed\My Gamemode\pawno\include\cnr/commands.inc(49) : error 017: undefined symbol "gTeam" C:\Users\DeStRoY\Downloads\Compressed\My Gamemode\pawno\include\cnr/commands.inc(49) : error 029: invalid expression, assumed zero C:\Users\DeStRoY\Downloads\Compressed\My Gamemode\pawno\include\cnr/commands.inc(49) : warning 215: expression has no effect C:\Users\DeStRoY\Downloads\Compressed\My Gamemode\pawno\include\cnr/commands.inc(50) : error 014: invalid statement; not in switch C:\Users\DeStRoY\Downloads\Compressed\My Gamemode\pawno\include\cnr/commands.inc(50) : warning 215: expression has no effect C:\Users\DeStRoY\Downloads\Compressed\My Gamemode\pawno\include\cnr/commands.inc(50) : warning 215: expression has no effect C:\Users\DeStRoY\Downloads\Compressed\My Gamemode\pawno\include\cnr/commands.inc(50) : error 001: expected token: ";", but found ":" C:\Users\DeStRoY\Downloads\Compressed\My Gamemode\pawno\include\cnr/commands.inc(50) : error 029: invalid expression, assumed zero C:\Users\DeStRoY\Downloads\Compressed\My Gamemode\pawno\include\cnr/commands.inc(50) : fatal error 107: too many error messages on one line
You have to change variables. He gave you an example. Also for this you need to know CNRSF well so I suggest dig a bit before attempting to do this.
|
Add the include after gTeam
PHP код:
|
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <core>
#include <float>
#include <cnr/commands>
#define BALLAS 0
#define GROVE 1
//team
new gTeam[MAX_PLAYERS];
You did not get what i said
i said INCLUDE commands inc AFTER gTeam PHP код:
|
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <core>
#include <float>
#include <cnr/colors>
new gTeam[MAX_PLAYERS];
#include <cnr/commands>
#include <cnr/dialogresponse>
#define TOTAL_TEAM_VEHICLES 10
#define NO_TEAMID -911
#define BALLAS 0
#define GROVE 1
//grove base gate
new grovedoor;
new bool:door_grove;
new Text3D:grovelabel;
//team vehicles
new BallasCars[TOTAL_TEAM_VEHICLES];
new GroveCars[TOTAL_TEAM_VEHICLES];
public OnPlayerSpawn(playerid)
{
TextDrawShowForAll(discord[0]);
TextDrawShowForAll(discord[1]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerInterior(playerid, 0);
TogglePlayerClock(playerid, 0);
ResetPlayerWeapons(playerid);
if(gteam[playerid] == 0)
{
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 25, 200);
GivePlayerWeapon(playerid, 28, 200);
GivePlayerWeapon(playerid, 34, 200);
GivePlayerWeapon(playerid, 30, 200);
SetPlayerPos(playerid, -2569.7415, 892.6765, 64.9844);
}
else if(gteam[playerid] == 1)
{
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 25, 200);
GivePlayerWeapon(playerid, 32, 200);
GivePlayerWeapon(playerid, 34, 200);
GivePlayerWeapon(playerid, 31, 200);
SetPlayerPos(playerid, -1704.2889, 1018.0909, 17.5859);
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0)
{
SetPlayerSkin(playerid, 102);
SetPlayerTeam(playerid, BALLAS);
GameTextForPlayer(playerid, "~p~Ballas", 1000, 4);
SetPlayerColor(playerid, COLOR_PURPLE);
gTeam[playerid] = 0;
}
if(classid == 1)
{
SetPlayerSkin(playerid, 104);
SetPlayerTeam(playerid, BALLAS);
GameTextForPlayer(playerid, "~p~Ballas", 1000, 4);
SetPlayerColor(playerid, COLOR_PURPLE);
gTeam[playerid] = 0;
}
if(classid == 2)
{
SetPlayerSkin(playerid, 106);
SetPlayerTeam(playerid, GROVE);
GameTextForPlayer(playerid, "~g~Grove", 1000, 4);
SetPlayerColor(playerid, COLOR_GREEN);
gTeam[playerid] = 1;
}
if(classid == 3)
{
SetPlayerSkin(playerid, 107);
SetPlayerTeam(playerid, GROVE);
GameTextForPlayer(playerid, "~g~Grove", 1000, 4);
SetPlayerColor(playerid, COLOR_GREEN);
gTeam[playerid] = 1;
}
SetupPlayerForClassSelection(playerid);
return 1;
}
PHP код:
|