13.06.2016, 19:12
I use it Like this:
But i show me errors
PHP код:
new Float:SDM1[][] =
{
{2321.2295,1091.7527,79.5547,200.2727}, // SDM1 1st Spawn Pos
{2225.3442,1113.3691,64.9291,85.5682}, // SDM1 2nd Spawn Pos
{2279.4407,1112.3759,57.6250,105.3083}, // SDM1 3st Spawn Pos
{2196.1343,1004.8544,79.5547,175.1823}, // SDM1 4th Spawn Pos
{2275.6519,1111.6068,71.2844,312.7136}, // SDM1 5th Spawn Pos
{2228.8796,1109.1208,64.8463,216.2060} // SDM1 6th Spawn Pos
};
PHP код:
if (strcmp("/sdm", cmdtext, true, 10) == 0)
{
new Random = random(sizeof(SDM1));
SetPlayerPos(playerid, SDM1[Random][0], SDM1[Random][1], SDM1[Random][2]);
SetPlayerFacingAngle(playerid, SDM1[Random][3]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid,137);
GivePlayerWeapon(playerid, 34, 99999);
GivePlayerWeapon(playerid, 46, 1);
}
return 1;
PHP код:
E:\GTA\gamemodes\mg.pwn(111) : error 017: undefined symbol "SDM1"
E:\GTA\gamemodes\mg.pwn(111) : error 029: invalid expression, assumed zero
E:\GTA\gamemodes\mg.pwn(111) : warning 215: expression has no effect
E:\GTA\gamemodes\mg.pwn(112) : error 017: undefined symbol "SDM1"
E:\GTA\gamemodes\mg.pwn(112) : warning 215: expression has no effect
E:\GTA\gamemodes\mg.pwn(112) : error 001: expected token: ";", but found "]"
E:\GTA\gamemodes\mg.pwn(112) : error 029: invalid expression, assumed zero
E:\GTA\gamemodes\mg.pwn(112) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.