29.07.2011, 13:13
Why doesnt this work:
Код:
SetPlayerTeamFromClass(playerid, classid);
SetPlayerTeamFromClass(playerid, classid);
public OnGameModeInit()
{
SetGameModeText("Blank Script");
AddPlayerClass(105,2507.3433,-1667.9476,13.3786,87.4340,0,0,0,0,0,0); // GroveGangster
AddPlayerClass(106,2505.7571,-1661.7249,13.4050,104.9574,0,0,0,0,0,0); // GroveGangster
AddPlayerClass(107,2504.2400,-1676.7767,13.3718,63.2837,0,0,0,0,0,0); // GroveGangster
AddPlayerClass(102,2000.7134,-1118.9550,26.7813,184.3736,0,0,0,0,0,0); // BallasGangster
AddPlayerClass(103,1996.8842,-1119.0229,26.7737,194.7137,0,0,0,0,0,0); // BallasGangster
AddPlayerClass(104,2006.3639,-1119.8727,26.6915,177.4802,0,0,0,0,0,0); // BallasGangster
CreateVehicle(541, 2507.3433, -1667.9476, 13.3786, 87.4340, -1, -1, 1000000);
SetTimer("SaveStats",30000,true);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
Team[playerid] = classid;
SetPlayerTeamFromClass(playerid, classid);
SetPlayerPos(playerid, 1959.281860, -1177.373901, 27.491060);
SetPlayerFacingAngle(playerid, 91.097679);
SetPlayerCameraLookAt(playerid, 1959.281860, -1177.373901, 27.491060);
SetPlayerCameraPos(playerid, 1959.281860 + (10 * floatsin(-91.097679, degrees)), -1177.373901 + (10 * floatcos(-91.097679, degrees)), 27.491060);
return 1;
}
C:\Users\mattt\Desktop\Deathmatch\gamemodes\Deathmatch.pwn(84) : error 017: undefined symbol "SetPlayerTeamFromClass"
Team[playerid] = classid;
SetPlayerTeamFromClass(playerid, classid);
public OnGameModeInit()
{
SetGameModeText("Blank Script");
AddPlayerClass(105,2507.3433,-1667.9476,13.3786,87.4340,0,0,0,0,0,0); // GroveGangster
AddPlayerClass(106,2505.7571,-1661.7249,13.4050,104.9574,0,0,0,0,0,0); // GroveGangster
AddPlayerClass(107,2504.2400,-1676.7767,13.3718,63.2837,0,0,0,0,0,0); // GroveGangster
AddPlayerClass(102,2000.7134,-1118.9550,26.7813,184.3736,0,0,0,0,0,0); // BallasGangster
AddPlayerClass(103,1996.8842,-1119.0229,26.7737,194.7137,0,0,0,0,0,0); // BallasGangster
AddPlayerClass(104,2006.3639,-1119.8727,26.6915,177.4802,0,0,0,0,0,0); // BallasGangster
CreateVehicle(541, 2507.3433, -1667.9476, 13.3786, 87.4340, -1, -1, 1000000);
SetTimer("SaveStats",30000,true);
return true;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
SetPlayerPos(playerid, 1959.281860, -1177.373901, 27.491060);
SetPlayerFacingAngle(playerid, 91.097679);
SetPlayerCameraLookAt(playerid, 1959.281860, -1177.373901, 27.491060);
SetPlayerCameraPos(playerid, 1959.281860 + (10 * floatsin(-91.097679, degrees)), -1177.373901 + (10 * floatcos(-91.097679, degrees)), 27.491060);
return true;
}
stock SetPlayerTeamFromClass(playerid, classid)
{
switch(classid)
{
case 105..107:Team[playerid] = TEAM_GROVE;
case 102..104:Team[playerid] = TEAM_BALLAS;
}
return true;
}
classid 0 is AddPlayerClass(105,2507.3433,-1667.9476,13.3786,87.4340,0,0,0,0,0,0); // GroveGangster
classid 1 is AddPlayerClass(106,2505.7571,-1661.7249,13.4050,104.9574,0,0,0,0,0,0); // GroveGangster
classid 2 is AddPlayerClass(107,2504.2400,-1676.7767,13.3718,63.2837,0,0,0,0,0,0); // GroveGangster
classid 3 is AddPlayerClass(102,2000.7134,-1118.9550,26.7813,184.3736,0,0,0,0,0,0); // BallasGangster
classid 4 is AddPlayerClass(103,1996.8842,-1119.0229,26.7737,194.7137,0,0,0,0,0,0); // BallasGangster
classid 5 is AddPlayerClass(104,2006.3639,-1119.8727,26.6915,177.4802,0,0,0,0,0,0); // BallasGangster