#include <a_samp>#include <foreach>#include <zcmd>#include <dini>// Coinsenum PLAYER_MAIN{ Coins}new pInfo[MAX_PLAYERS][PLAYER_MAIN];//Sumonew SUMO[MAX_PLAYERS];new SUMOCAR2[MAX_PLAYERS];new Roman[MAX_PLAYERS];new SumoCar[MAX_PLAYERS];new SumoPlayers;new InSumo[MAX_PLAYERS];new Float:SumoSpawn2 [][4] ={{1522.8535,-1260.7614,198.6326,202.2600},{1512.7456,-1335.3345,198.6875,326.3046},{1504.8740,-1270.8276,198.7156,225.3372},{1564.9799,-1322.8571,198.6505,55.6632},{1569.9921,-1292.7355,198.5749,100.7271},{1495.2258,-1315.1505,198.6928,292.8104},{1493.1748,-1290.9005,198.6734,258.1606}};#define ScoreWin 25#define CashWin 1500#define red 0xFF0000AAnew file[100];new Name[MAX_PLAYER_NAME];public OnPlayerConnect(playerid){ InSumo[playerid] =0;//Sumo MG SUMO[playerid]=0; return 1;}public OnPlayerDisconnect(playerid, reason){ SUMO[playerid]=0;if(InSumo[playerid] == 1){DestroyVehicle(SumoCar[playerid]); SumoPlayers--;InSumo[playerid] = 0;new string[1900]; if(Roman[playerid] == 0) { format(string, sizeof(string), \"%s {cccccc}lost his car in Car Sumo Minigame!\", Name(playerid)); } if(Roman[playerid] == 1) { format(string, sizeof(string), \"%s {cccccc}lost his car in Car Sumo Minigame!\", Name(playerid)); } SendClientMessageToAll(red,string); if(SumoPlayers == 1) { for(new i = 0; i < GetMaxPlayers(); i++) { if(InSumo == 1) { if(Roman[playerid] == 0) { format(string, sizeof(string), \"{ff0000}%s {cccccc}win car sumo minigame! {3399ff}+%d {cccccc}Score and {3399ff}+100 {cccccc}Coins and {3399ff}+%d{cccccc}$ \", Name(i),ScoreWin,CashWin); } if(Roman[playerid] == 1) { format(string, sizeof(string), \"{ff0000}%s {cccccc}a castigat car sumo minigame! {3399ff}+%d {cccccc}Score si {3399ff}+100 {cccccc}Coins si {3399ff}+%d{cccccc}$\", Name(i),ScoreWin,CashWin); } SendClientMessageToAll(red,string); SetPlayerScore(i,GetPlayerScore(i)+ScoreWin); GivePlayerMoney(i,CashWin); pInfo[playerid][Coins] += 100;dini_IntSet(file,\"Coins\", pInfo[playerid][Coins]); SumoPlayers = 0; SumoStarted = 0; DestroyVehicle(SumoCar);SetTimerEx(\"SpawnPP\",1000,0,\"i\",i);InSumo = 0; } } }} return 1;}forward SumoRandomCar(playerid);public SumoRandomCar(playerid){ new pRandom = random(sizeof(SumoSpawn2)); new vRandom = random(5); switch (vRandom) { case 0:{DestroyVehicle(SUMOCAR2[playerid]);SUMOCAR2[playerid] = CreateVehicle(475,SumoSpawn2[pRandom][0], SumoSpawn2[pRandom][1], SumoSpawn2[pRandom][2], SumoSpawn2[pRandom][3],-1,-1,9999999);}case 1:{DestroyVehicle(SUMOCAR2[playerid]);SUMOCAR2[playerid] = CreateVehicle(504,SumoSpawn2[pRandom][0], SumoSpawn2[pRandom][1], SumoSpawn2[pRandom][2], SumoSpawn2[pRandom][3],-1,-1,9999999);}case 2:{DestroyVehicle(SUMOCAR2[playerid]);SUMOCAR2[playerid] = CreateVehicle(560,SumoSpawn2[pRandom][0], SumoSpawn2[pRandom][1], SumoSpawn2[pRandom][2], SumoSpawn2[pRandom][3],-1,-1,9999999);} case 3: {DestroyVehicle(SUMOCAR2[playerid]);SUMOCAR2[playerid] = CreateVehicle(438,SumoSpawn2[pRandom][0], SumoSpawn2[pRandom][1], SumoSpawn2[pRandom][2], SumoSpawn2[pRandom][3],-1,-1,9999999);} case 4: {DestroyVehicle(SUMOCAR2[playerid]);SUMOCAR2[playerid] = CreateVehicle(596,SumoSpawn2[pRandom][0], SumoSpawn2[pRandom][1], SumoSpawn2[pRandom][2], SumoSpawn2[pRandom][3],-1,-1,9999999);} } return SUMOCAR2[playerid];}public OnPlayerUpdate(playerid){ if(SUMO[playerid]==1) { new Float:x,Float:y,Float:z; if(GetPlayerPos(playerid,x,y,z) && z < 35){ RemovePlayerFromVehicle(playerid); PutPlayerInVehicle(playerid,SumoRandomCar(playerid),0); return 1;}}return true;}CMD:sumo(playerid,params[]){ if(InSumo[playerid] == 0){if(SumoStarted == 0){ if(Roman[playerid] == 0) {SendClientMessageToAll(0x6495EDAA,\"{3399ff}Car Sumo {cccccc}minigame has been Started! Type {ff0000}/sumo {cccccc}to join!\");} if(Roman[playerid] == 1) { SendClientMessageToAll(0x6495EDAA,\"{3399ff}Car Sumo {cccccc}minigame a inceput! Scrie {ff0000}/sumo {cccccc}ca sa te alaturi!\"); }SumoStarted=1;InSumo[playerid] = 1;SumoSpawn=2;SumoCar[playerid] = AddStaticVehicle(471,628.465,2919.210,5.828,11.0,-1,-1);PutPlayerInVehicle(playerid,SumoCar[playerid],0);SumoTimer = SetTimer(\"StartSumo\",600,1);SumoSec = 20;TogglePlayerControllable(playerid,0);SumoPlayers = 1;}elseif(SumoStarted == 1){SumoPlayers++;if(SumoSpawn == 2){SumoSpawn=3;SumoCar[playerid] = AddStaticVehicle(471,615.871,2916.907,5.828,11.0,-1,-1);PutPlayerInVehicle(playerid,SumoCar[playerid],0);InSumo[playerid] = 1;TogglePlayerControllable(playerid,0);}elseif(SumoSpawn == 3){SumoSpawn=4;SumoCar[playerid] = AddStaticVehicle(471,604.882,2914.607,5.828,11.0,-1,-1);PutPlayerInVehicle(playerid,SumoCar[playerid],0);InSumo[playerid] = 1;TogglePlayerControllable(playerid,0);}elseif(SumoSpawn == 4){SumoSpawn=5;SumoCar[playerid] = AddStaticVehicle(471,593.613,2912.360,5.828,11.0,-1,-1);PutPlayerInVehicle(playerid,SumoCar[playerid],0);InSumo[playerid] = 1;TogglePlayerControllable(playerid,0);}elseif(SumoSpawn == 5){SumoSpawn=6;SumoCar[playerid] = AddStaticVehicle(471,614.750,2987.410,5.835,192.0,-1,-1);PutPlayerInVehicle(playerid,SumoCar[playerid],0);InSumo[playerid] = 1;TogglePlayerControllable(playerid,0);}elseif(SumoSpawn == 6){SumoSpawn=7;SumoCar[playerid] = AddStaticVehicle(471,634.110,2991.212,5.835,192.0,-1,-1);PutPlayerInVehicle(playerid,SumoCar[playerid],0);InSumo[playerid] = 1;TogglePlayerControllable(playerid,0);}elseif(SumoSpawn == 7){SumoSpawn=8;SumoCar[playerid] = AddStaticVehicle(471,654.411,2994.845,5.835,192.0,-1,-1);PutPlayerInVehicle(playerid,SumoCar[playerid],0);InSumo[playerid] = 1;TogglePlayerControllable(playerid,0);}elseif(SumoSpawn == {SumoSpawn=9;SumoCar[playerid] = AddStaticVehicle(471,585.599,2956.369,5.853,282.0,-1,-1);PutPlayerInVehicle(playerid,SumoCar[playerid],0);InSumo[playerid] = 1;TogglePlayerControllable(playerid,0);}elseif(SumoSpawn == 9){SumoSpawn=10;KillTimer(SumoTimer);SumoCar[playerid] = AddStaticVehicle(471,661.134,2956.228,5.737,101.0,-1,-1);PutPlayerInVehicle(playerid,SumoCar[playerid],0);InSumo[playerid] = 1;SumoStarted = 2;SendClientMessageToAll(0xAA3333AA,\"{cccccc}Just fuck up your car! {3399ff}Car Sumo Minigame {cccccc}Started!\");for(new i = 0; i < GetMaxPlayers(); i++) { if(InSumo == 1) { TogglePlayerControllable(i,1); GameTextForPlayer(i,\"~r~~h~Fuck up the Sumo Game!\",3000,3); SetTimerEx(\"Eliminat\",500,0,\"i\",i); return 1; } return 1; } } }else SendClientMessage(playerid,0xAA3333AA,\"{3399ff}Car Sumo Minigame {cccccc}is already Started!\");}else SendClientMessage(playerid,0xAA3333AA,\"{cccccc}You are already in {3399ff}Car Sumo Minigame!\");return 1;}public OnPlayerDeath(playerid, killerid, reason){ if(InSumo[playerid] == 1){DestroyVehicle(SumoCar[playerid]); SumoPlayers--;InSumo[playerid] = 0;new string [1900]; if(Roman[playerid] == 0) { format(string, sizeof(string), \"%s {cccccc}lost his car in Car Sumo Minigame!\", Name(playerid)); } if(Roman[playerid] == 1) { format(string, sizeof(string), \"%s {cccccc}si-a pierdut masina in Car Sumo Minigame!\", Name(playerid)); } SendClientMessageToAll(red,string); if(SumoPlayers == 1) { for(new i = 0; i < GetMaxPlayers(); i++) { if(InSumo == 1) { if(Roman[playerid] == 0) { format(string, sizeof(string), \"{ff0000}%s {cccccc}win car sumo minigame! {3399ff}+%d {cccccc}Score and {3399ff}+50 {cccccc}Coins and {3399ff}+%d{cccccc}$ \", Name(i),ScoreWin,CashWin); } if(Roman[playerid] == 1) { format(string, sizeof(string), \"{ff0000}%s {cccccc}a castigat car sumo minigame! {3399ff}+%d {cccccc}Score si {3399ff}+100 {cccccc}Coins si {3399ff}+%d{cccccc}$\", Name(i),ScoreWin,CashWin); }// new file [127]; SendClientMessageToAll(red,string); SetPlayerScore(i,GetPlayerScore(i)+ScoreWin); GivePlayerMoney(i,CashWin); pInfo[playerid][Coins] += 50;dini_IntSet(file,\"Coins\", pInfo[playerid][Coins]); SumoPlayers = 0; SumoStarted = 0; new Float:x,Float:y,Float:z; GetPlayerPos(i,x,y,z); SetPlayerPos(i,x,y,z+1); DestroyVehicle(SumoCar); SetTimerEx(\"SpawnPP\",1000,0,\"i\",i);TogglePlayerControllable(i,1);InSumo = 0; } } }}return 1;}public OnPlayerSpawn(playerid){ InSumo[playerid] =0;//Sumo MG if(SUMO[playerid]==1) {PutPlayerInVehicle(playerid,SumoRandomCar(playerid),0);}return 1;}public OnVehicleSpawn(vehicleid){/* if(vehicleid==SumoCar){ DestroyVehicle(vehicleid); }}*/return 1;}public OnPlayerStateChange(playerid, newstate, oldstate){if(InSumo[playerid] == 1) { PutPlayerInVehicle(playerid,SumoCar[playerid],0); } return 1;}//Sumoforward StartSumo(playerid);public StartSumo(playerid){ if(SumoSec > 1) {new time;SumoSec--;time = (SumoSec);format(strec, sizeof(strec), \"~g~%d ~w~seconds remaining\", time);for(new i = 0; i < GetMaxPlayers(); i++) { if(InSumo == 1) {GameTextForPlayer(i, strec, 3000, 3);}} } if(SumoSec == 1) {SumoSec = 0;if(SumoPlayers >= 2){for(new i = 0; i < GetMaxPlayers(); i++) { if(InSumo == 1) {GameTextForPlayer(i, \"~g~~h~Sumo~n~~r~~h~START\", 3000, 3);KillTimer(SumoTimer);TogglePlayerControllable(i,1);SumoStarted=2;SetTimerEx(\"Eliminat\",500,0,\"i\",i);}}}elseif(SumoPlayers < 2){ for(new i = 0; i < GetMaxPlayers(); i++) { if(InSumo == 1) { new Float:x,Float:y,Float:z; GetPlayerPos(i,x,y,z); SetPlayerPos(i,x,y,z+1); DestroyVehicle(SumoCar); SetTimerEx(\"SpawnPP\",1000,0,\"i\",i);KillTimer(SumoTimer);InSumo =0;TogglePlayerControllable(i,1);}}SumoStarted=0;if(Roman[playerid] == 0) {SendClientMessageToAll(0x6495EDAA,\"{3399ff}Car Sumo Minigame {cccccc}has been finished! {3399ff}Reason: {cccccc}minim players is two!\");}if(Roman[playerid] == 1) { SendClientMessageToAll(0x6495EDAA,\"{3399ff}Car Sumo Minigame {cccccc}s-a terminat! {3399ff}Reason: {cccccc}trebuie minim 2 jucatori!\"); }} } return 1;}
C:\\Users\\Desktop\\samp\\filterscripts\\minigame.pwn(58) : error 012: invalid function call, not a valid addressC:\\Users\\Desktop\\samp\\filterscripts\\minigame.pwn(58) : warning 215: expression has no effectC:\\Users\\Desktop\\samp\\filterscripts\\minigame.pwn(58) : error 001: expected token: \";\", but found \")\"C:\\Users\\Desktop\\samp\\filterscripts\\minigame.pwn(58) : error 029: invalid expression, assumed zeroC:\\Users\\Desktop\\samp\\filterscripts\\minigame.pwn(58) : fatal error 107: too many error messages on one line
Name(playerid)
stock Name(playerid){new name[MAX_PLAYER_NAME];GetPlayerName(playerid,name,sizeof(name));return name;}
#include <a_samp>#include <foreach>#include <zcmd>#include <dini>// Coinsenum PLAYER_MAIN{ Coins}new pInfo[MAX_PLAYERS][PLAYER_MAIN];//Sumonew SUMO[MAX_PLAYERS];new SUMOCAR2[MAX_PLAYERS];new Roman[MAX_PLAYERS];new SumoCar[MAX_PLAYERS];new SumoPlayers;new InSumo[MAX_PLAYERS];new Float:SumoSpawn2 [][4] ={{1522.8535,-1260.7614,198.6326,202.2600},{1512.7456,-1335.3345,198.6875,326.3046},{1504.8740,-1270.8276,198.7156,225.3372},{1564.9799,-1322.8571,198.6505,55.6632},{1569.9921,-1292.7355,198.5749,100.7271},{1495.2258,-1315.1505,198.6928,292.8104},{1493.1748,-1290.9005,198.6734,258.1606}};#define ScoreWin 25#define CashWin 1500#define red 0xFF0000AAnew file[100];new Nev[MAX_PLAYER_NAME];public OnPlayerConnect(playerid){ InSumo[playerid] =0;//Sumo MG SUMO[playerid]=0; return 1;}public OnPlayerDisconnect(playerid, reason){ SUMO[playerid]=0; if(InSumo[playerid] == 1) { DestroyVehicle(SumoCar[playerid]); SumoPlayers--; InSumo[playerid] = 0; new string[1900]; if(Roman[playerid] == 0) { format(string, sizeof(string), \"%s {cccccc}lost his car in Car Sumo Minigame!\", Name(playerid)); } if(Roman[playerid] == 1) { format(string, sizeof(string), \"%s {cccccc}lost his car in Car Sumo Minigame!\", Name(playerid)); } SendClientMessageToAll(red,string); if(SumoPlayers == 1) { for(new i = 0; i < GetMaxPlayers(); i++) { if(InSumo == 1) { if(Roman[playerid] == 0) { format(string, sizeof(string), \"{ff0000}%s {cccccc}win car sumo minigame! {3399ff}+%d {cccccc}Score and {3399ff}+100 {cccccc}Coins and {3399ff}+%d{cccccc}$ \", Name(i),ScoreWin,CashWin); } if(Roman[playerid] == 1) { format(string, sizeof(string), \"{ff0000}%s {cccccc}a castigat car sumo minigame! {3399ff}+%d {cccccc}Score si {3399ff}+100 {cccccc}Coins si {3399ff}+%d{cccccc}$\", Name(i),ScoreWin,CashWin); } SendClientMessageToAll(red,string); SetPlayerScore(i,GetPlayerScore(i)+ScoreWin); GivePlayerMoney(i,CashWin); pInfo[playerid][Coins] += 100; dini_IntSet(file,\"Coins\", pInfo[playerid][Coins]); SumoPlayers = 0; SumoStarted = 0; DestroyVehicle(SumoCar); SetTimerEx(\"SpawnPP\",1000,0,\"i\",i); InSumo = 0; } } } } return 1;}forward SumoRandomCar(playerid);public SumoRandomCar(playerid){ new pRandom = random(sizeof(SumoSpawn2)); new vRandom = random(5); switch (vRandom) { case 0: {DestroyVehicle(SUMOCAR2[playerid]);SUMOCAR2[playerid] = CreateVehicle(475,SumoSpawn2[pRandom][0], SumoSpawn2[pRandom][1], SumoSpawn2[pRandom][2], SumoSpawn2[pRandom][3],-1,-1,9999999);} case 1: {DestroyVehicle(SUMOCAR2[playerid]);SUMOCAR2[playerid] = CreateVehicle(504,SumoSpawn2[pRandom][0], SumoSpawn2[pRandom][1], SumoSpawn2[pRandom][2], SumoSpawn2[pRandom][3],-1,-1,9999999);} case 2: {DestroyVehicle(SUMOCAR2[playerid]);SUMOCAR2[playerid] = CreateVehicle(560,SumoSpawn2[pRandom][0], SumoSpawn2[pRandom][1], SumoSpawn2[pRandom][2], SumoSpawn2[pRandom][3],-1,-1,9999999);} case 3: {DestroyVehicle(SUMOCAR2[playerid]);SUMOCAR2[playerid] = CreateVehicle(438,SumoSpawn2[pRandom][0], SumoSpawn2[pRandom][1], SumoSpawn2[pRandom][2], SumoSpawn2[pRandom][3],-1,-1,9999999);} case 4: {DestroyVehicle(SUMOCAR2[playerid]);SUMOCAR2[playerid] = CreateVehicle(596,SumoSpawn2[pRandom][0], SumoSpawn2[pRandom][1], SumoSpawn2[pRandom][2], SumoSpawn2[pRandom][3],-1,-1,9999999);} } return SUMOCAR2[playerid];}public OnPlayerUpdate(playerid){ if(SUMO[playerid]==1) { new Float:x,Float:y,Float:z; if(GetPlayerPos(playerid,x,y,z) && z < 35) { RemovePlayerFromVehicle(playerid); PutPlayerInVehicle(playerid,SumoRandomCar(playerid),0); return 1; } } return true;}CMD:sumo(playerid,params[]) { if(InSumo[playerid] == 0){ if(SumoStarted == 0){ if(Roman[playerid] == 0) { SendClientMessageToAll(0x6495EDAA,\"{3399ff}Car Sumo {cccccc}minigame has been Started! Type {ff0000}/sumo {cccccc}to join!\"); } if(Roman[playerid] == 1) { SendClientMessageToAll(0x6495EDAA,\"{3399ff}Car Sumo {cccccc}minigame a inceput! Scrie {ff0000}/sumo {cccccc}ca sa te alaturi!\"); } SumoStarted=1; InSumo[playerid] = 1; SumoSpawn=2; SumoCar[playerid] = AddStaticVehicle(471,628.465,2919.210,5.828,11.0,-1,-1); PutPlayerInVehicle(playerid,SumoCar[playerid],0); SumoTimer = SetTimer(\"StartSumo\",600,1); SumoSec = 20; TogglePlayerControllable(playerid,0); SumoPlayers = 1; }else if(SumoStarted == 1) { SumoPlayers++; if(SumoSpawn == 2) { SumoSpawn=3; SumoCar[playerid] = AddStaticVehicle(471,615.871,2916.907,5.828,11.0,-1,-1); PutPlayerInVehicle(playerid,SumoCar[playerid],0); InSumo[playerid] = 1; TogglePlayerControllable(playerid,0); }else if(SumoSpawn == 3) { SumoSpawn=4; SumoCar[playerid] = AddStaticVehicle(471,604.882,2914.607,5.828,11.0,-1,-1); PutPlayerInVehicle(playerid,SumoCar[playerid],0); InSumo[playerid] = 1; TogglePlayerControllable(playerid,0); }else if(SumoSpawn == 4) { SumoSpawn=5; SumoCar[playerid] = AddStaticVehicle(471,593.613,2912.360,5.828,11.0,-1,-1); PutPlayerInVehicle(playerid,SumoCar[playerid],0); InSumo[playerid] = 1; TogglePlayerControllable(playerid,0); }else if(SumoSpawn == 5) { SumoSpawn=6; SumoCar[playerid] = AddStaticVehicle(471,614.750,2987.410,5.835,192.0,-1,-1); PutPlayerInVehicle(playerid,SumoCar[playerid],0); InSumo[playerid] = 1; TogglePlayerControllable(playerid,0); }else if(SumoSpawn == 6) { SumoSpawn=7; SumoCar[playerid] = AddStaticVehicle(471,634.110,2991.212,5.835,192.0,-1,-1); PutPlayerInVehicle(playerid,SumoCar[playerid],0); InSumo[playerid] = 1; TogglePlayerControllable(playerid,0); }else if(SumoSpawn == 7) { SumoSpawn=8; SumoCar[playerid] = AddStaticVehicle(471,654.411,2994.845,5.835,192.0,-1,-1); PutPlayerInVehicle(playerid,SumoCar[playerid],0); InSumo[playerid] = 1; TogglePlayerControllable(playerid,0); }else if(SumoSpawn == { SumoSpawn=9; SumoCar[playerid] = AddStaticVehicle(471,585.599,2956.369,5.853,282.0,-1,-1); PutPlayerInVehicle(playerid,SumoCar[playerid],0); InSumo[playerid] = 1; TogglePlayerControllable(playerid,0); }else if(SumoSpawn == 9) { SumoSpawn=10; KillTimer(SumoTimer); SumoCar[playerid] = AddStaticVehicle(471,661.134,2956.228,5.737,101.0,-1,-1); PutPlayerInVehicle(playerid,SumoCar[playerid],0); InSumo[playerid] = 1; SumoStarted = 2; SendClientMessageToAll(0xAA3333AA,\"{cccccc}Just fuck up your car! {3399ff}Car Sumo Minigame {cccccc}Started!\"); for(new i = 0; i < GetMaxPlayers(); i++) { if(InSumo == 1) { TogglePlayerControllable(i,1); GameTextForPlayer(i,\"~r~~h~Fuck up the Sumo Game!\",3000,3); SetTimerEx(\"Eliminat\",500,0,\"i\",i); return 1; } return 1; } } }else SendClientMessage(playerid,0xAA3333AA,\"{3399ff}Car Sumo Minigame {cccccc}is already Started!\"); }else SendClientMessage(playerid,0xAA3333AA,\"{cccccc}You are already in {3399ff}Car Sumo Minigame!\"); return 1;}public OnPlayerDeath(playerid, killerid, reason){ if(InSumo[playerid] == 1) { DestroyVehicle(SumoCar[playerid]); SumoPlayers--; InSumo[playerid] = 0; new string [1900]; if(Roman[playerid] == 0) { format(string, sizeof(string), \"%s {cccccc}lost his car in Car Sumo Minigame!\", Name(playerid)); } if(Roman[playerid] == 1) { format(string, sizeof(string), \"%s {cccccc}si-a pierdut masina in Car Sumo Minigame!\", Name(playerid)); } SendClientMessageToAll(red,string); if(SumoPlayers == 1) { for(new i = 0; i < GetMaxPlayers(); i++) { if(InSumo == 1) { if(Roman[playerid] == 0) { format(string, sizeof(string), \"{ff0000}%s {cccccc}win car sumo minigame! {3399ff}+%d {cccccc}Score and {3399ff}+50 {cccccc}Coins and {3399ff}+%d{cccccc}$ \", Name(i),ScoreWin,CashWin); } if(Roman[playerid] == 1) { format(string, sizeof(string), \"{ff0000}%s {cccccc}a castigat car sumo minigame! {3399ff}+%d {cccccc}Score si {3399ff}+100 {cccccc}Coins si {3399ff}+%d{cccccc}$\", Name(i),ScoreWin,CashWin); }// new file [127]; SendClientMessageToAll(red,string); SetPlayerScore(i,GetPlayerScore(i)+ScoreWin); GivePlayerMoney(i,CashWin); pInfo[playerid][Coins] += 50; dini_IntSet(file,\"Coins\", pInfo[playerid][Coins]); SumoPlayers = 0; SumoStarted = 0; new Float:x,Float:y,Float:z; GetPlayerPos(i,x,y,z); SetPlayerPos(i,x,y,z+1); DestroyVehicle(SumoCar); SetTimerEx(\"SpawnPP\",1000,0,\"i\",i); TogglePlayerControllable(i,1); InSumo = 0; } } } } return 1; }public OnPlayerSpawn(playerid){ InSumo[playerid] =0;//Sumo MG if(SUMO[playerid]==1) { PutPlayerInVehicle(playerid,SumoRandomCar(playerid),0); } return 1;}public OnVehicleSpawn(vehicleid){/* if(vehicleid==SumoCar) { DestroyVehicle(vehicleid); } }*/ return 1;}public OnPlayerStateChange(playerid, newstate, oldstate){ if(InSumo[playerid] == 1) { PutPlayerInVehicle(playerid,SumoCar[playerid],0); } return 1;}//Sumoforward StartSumo(playerid);public StartSumo(playerid){ if(SumoSec > 1) { new time; SumoSec--; time = (SumoSec); format(strec, sizeof(strec), \"~g~%d ~w~seconds remaining\", time); for(new i = 0; i < GetMaxPlayers(); i++) { if(InSumo == 1) { GameTextForPlayer(i, strec, 3000, 3); } } } if(SumoSec == 1) { SumoSec = 0; if(SumoPlayers >= 2) { for(new i = 0; i < GetMaxPlayers(); i++) { if(InSumo == 1) { GameTextForPlayer(i, \"~g~~h~Sumo~n~~r~~h~START\", 3000, 3); KillTimer(SumoTimer); TogglePlayerControllable(i,1); SumoStarted=2; SetTimerEx(\"Eliminat\",500,0,\"i\",i); } } }else if(SumoPlayers < 2) { for(new i = 0; i < GetMaxPlayers(); i++) { if(InSumo == 1) { new Float:x,Float:y,Float:z; GetPlayerPos(i,x,y,z); SetPlayerPos(i,x,y,z+1); DestroyVehicle(SumoCar); SetTimerEx(\"SpawnPP\",1000,0,\"i\",i); KillTimer(SumoTimer); InSumo =0; TogglePlayerControllable(i,1); } } SumoStarted=0; if(Roman[playerid] == 0) { SendClientMessageToAll(0x6495EDAA,\"{3399ff}Car Sumo Minigame {cccccc}has been finished! {3399ff}Reason: {cccccc}minim players is two!\"); } if(Roman[playerid] == 1) { SendClientMessageToAll(0x6495EDAA,\"{3399ff}Car Sumo Minigame {cccccc}s-a terminat! {3399ff}Reason: {cccccc}trebuie minim 2 jucatori!\"); } } } return 1;}stock Name(playerid){new name[24];GetPlayerName(playerid,name,24);return name;}
new Name[MAX_PLAYER_NAME];
new string[1900];