if(!strcmp(cmdtext, "/deagledm", true)) { GivePlayerWeapon(playerid, 24, 50000000); new pName[24]; new str[128]; GetPlayerName(playerid, pName, 24); format(str, 128, "%s has teleported to /deagledm", pName); SendClientMessageToAll(0xFF9900AA, str); new RandomSpawn = random(sizeof(DESpawns)); SetPlayerPos(playerid, DESpawns[RandomSpawn][0], DESpawns[RandomSpawn][1], DESpawns[RandomSpawn][2], DESpawns[RandomSpawn][3], DESpawns[RandomSpawn][4], DESpawns[RandomSpawn][5],DESpawns[RandomSpawn][6]); SetPlayerFacingAngle(playerid, DESpawns[RandomSpawn][7]); ResetPlayerWeaponsEx(playerid, 24); return 1;
new Float:DESpawns[8][4] = { {1356.9586,2779.5247,187.3727,90.8971}, {1356.4540,2783.1697,187.3752,89.6437}, {1356.5916,2786.7891,187.2808,89.6437}, {1356.3624,2790.1460,187.1783,359.6437}, {1347.2617,2789.8162,187.1691,89.6437}, {1346.7258,2783.3672,187.4717,177.3778}, {1346.2091,2780.1177,187.3761,181.3787}, {1346.5825,2785.9814,187.3735,284.5387} };
C:\Users\OmarSilver\Documents\samp server\gamemodes\dodo.pwn(475) : error 032: array index out of bounds (variable "DESpawns") C:\Users\OmarSilver\Documents\samp server\gamemodes\dodo.pwn(476) : error 032: array index out of bounds (variable "DESpawns")
if(!strcmp(cmdtext, "/deagledm", true))
{
GivePlayerWeapon(playerid, 24, 50000000);
new pName[24];
new str[128];
GetPlayerName(playerid, pName, 24);
format(str, 128, "%s has teleported to /deagledm", pName);
SendClientMessageToAll(0xFF9900AA, str);
new RandomSpawn = random(sizeof(DESpawns));
SetPlayerPos(playerid, DESpawns[RandomSpawn][0], DESpawns[RandomSpawn][1], DESpawns[RandomSpawn][2], DESpawns[RandomSpawn][3]);
SetPlayerFacingAngle(playerid, DESpawns[RandomSpawn][7]);
ResetPlayerWeaponsEx(playerid, 24);
return 1;
C:\Users\OmarSilver\Documents\samp server\gamemodes\dodo.pwn(476) : error 032: array index out of bounds (variable "DESpawns")
Код:
C:\Users\OmarSilver\Documents\samp server\gamemodes\dodo.pwn(476) : error 032: array index out of bounds (variable "DESpawns") |
if(!strcmp(cmdtext, "/deagledm", true))
{
GivePlayerWeapon(playerid, 24, 50000000);
new pName[24];
new str[128];
GetPlayerName(playerid, pName, 24);
format(str, 128, "%s has teleported to /deagledm", pName);
SendClientMessageToAll(0xFF9900AA, str);
new RandomSpawn = random(sizeof(DESpawns));
SetPlayerPos(playerid, DESpawns[RandomSpawn][0], DESpawns[RandomSpawn][1], DESpawns[RandomSpawn][2], DESpawns[RandomSpawn][3]);
SetPlayerFacingAngle(playerid, DESpawns[RandomSpawn][4]);
ResetPlayerWeaponsEx(playerid, 24);
return 1;
pawn Код:
|
SetPlayerFacingAngle(playerid, DESpawns[RandomSpawn][3]);
new Float:DESpawns[8][4] = {
new Float:DESpawns[9][5] = {
new Float:DESpawns[8][4] = { {1356.9586,2779.5247,187.3727,90.8971}, {1356.4540,2783.1697,187.3752,89.6437}, {1356.5916,2786.7891,187.2808,89.6437}, {1356.3624,2790.1460,187.1783,359.6437}, {1347.2617,2789.8162,187.1691,89.6437}, {1346.7258,2783.3672,187.4717,177.3778}, {1346.2091,2780.1177,187.3761,181.3787}, {1346.5825,2785.9814,187.3735,284.5387} };
if(!strcmp(cmdtext, "/deagledm", true)) { GivePlayerWeapon(playerid, 24, 50000000); new pName[24]; new str[128]; GetPlayerName(playerid, pName, 24); format(str, 128, "%s has teleported to /deagledm", pName); SendClientMessageToAll(0xFF9900AA, str); new RandomSpawn = random(sizeof(DESpawns)); SetPlayerPos(playerid, DESpawns[RandomSpawn][0], DESpawns[RandomSpawn][1], DESpawns[RandomSpawn][2], DESpawns[RandomSpawn][3]); SetPlayerFacingAngle(playerid, DESpawns[RandomSpawn][3]); ResetPlayerWeaponsEx(playerid, 24);
SetPlayerPos(playerid, DESpawns[RandomSpawn][0], DESpawns[RandomSpawn][1], DESpawns[RandomSpawn][2], DESpawns[RandomSpawn][3]);
SetPlayerPos(playerid, DESpawns[RandomSpawn][0], DESpawns[RandomSpawn][1], DESpawns[RandomSpawn][2]);
new Float:HydraSpawns[2][4] = { {-972.9755,1069.8314,1345.0050,85.8408}, {-1134.6814,1049.0612,1345.7662,270.3724} };
SetPlayerInterior(playerid, 10); new pName[24]; new str[128]; GetPlayerName(playerid, pName, 24); format(str, 128, "%s has teleported to /hydra dm", pName); SendClientMessageToAll(0xFF9900AA, str); new Random = random(sizeof(HydraSpawns)); SetPlayerPos(playerid, HydraSpawns[Random][0]); SetPlayerFacingAngle(playerid, HydraSpawns[Random][1]);
i got 7 warnings already bro -_- FUCK THEM THE IMPORTANT THING IT WORKS XD and btw i made a hydra dm
the random spawns are not working! help? Код:
new Float:HydraSpawns[2][4] = { {-972.9755,1069.8314,1345.0050,85.8408}, {-1134.6814,1049.0612,1345.7662,270.3724} }; Код:
SetPlayerInterior(playerid, 10); new pName[24]; new str[128]; GetPlayerName(playerid, pName, 24); format(str, 128, "%s has teleported to /hydra dm", pName); SendClientMessageToAll(0xFF9900AA, str); new Random = random(sizeof(HydraSpawns)); SetPlayerPos(playerid, HydraSpawns[Random][0]); SetPlayerFacingAngle(playerid, HydraSpawns[Random][1]); |