CMD:cdp(playerid, params[]) { #pragma unused params TextDrawShowForPlayer(playerid, Text:pg); TextDrawShowForPlayer(playerid, Text:scoretxt); TextDrawShowForPlayer(playerid,Textdraw2[playerid]); TextDrawShowForPlayer(playerid,Textdraw3[playerid]); TextDrawShowForPlayer(playerid, Text:ECDP); TextDrawShowForPlayer(playerid, Text:ECDP1); TextDrawShowForPlayer(playerid, Text:ECDP2); TextDrawShowForPlayer(playerid, Text:ECDP3); TextDrawShowForPlayer(playerid, Text:ECDP4); TextDrawShowForPlayer(playerid, Text:ECDP5); TextDrawShowForPlayer(playerid, Text:ECDP6); TextDrawShowForPlayer(playerid, Text:ECDP7); TextDrawShowForPlayer(playerid, Text:ECDP8); TextDrawShowForPlayer(playerid, Text:ECDP9); TextDrawShowForPlayer(playerid, Text:ECDP10); TextDrawShowForPlayer(playerid, Text:ECDP11); TextDrawShowForPlayer(playerid, Text:ECDP12); TextDrawShowForPlayer(playerid, Text:rachasds); TextDrawShowForPlayer(playerid, Text:rachasds1); TextDrawShowForPlayer(playerid, Text:rachasds2); TextDrawShowForPlayer(playerid, Text:rachasds3); TextDrawShowForPlayer(playerid, Text:rachasds4); TextDrawShowForPlayer(playerid, Text:rachasds5); TextDrawShowForPlayer(playerid, Text:rachasds6); TextDrawShowForPlayer(playerid, Text:rachasds7); TextDrawShowForPlayer(playerid, Text:rachasds8); TextDrawShowForPlayer(playerid, Text:rachasds9); TextDrawShowForPlayer(playerid, Text:rachasds10); TextDrawShowForPlayer(playerid, Text:rachasds11); TextDrawShowForPlayer(playerid, Text:rachasds12); TextDrawShowForPlayer(playerid, Text:rachasds13); TextDrawShowForPlayer(playerid, Text:rachasds14); TextDrawShowForPlayer(playerid, Text:rachasds15); TextDrawShowForPlayer(playerid, Text:rachasds16); TextDrawShowForPlayer(playerid, Text:rachasds17); TextDrawShowForPlayer(playerid, Text:rachasds18); TextDrawShowForPlayer(playerid, Text:rachasds19); TextDrawShowForPlayer(playerid, Text:rachasds20); TextDrawShowForPlayer(playerid, Text:rachasds21); TextDrawShowForPlayer(playerid, Text:rachasds22); TextDrawShowForPlayer(playerid, Text:rachasds23); TextDrawShowForPlayer(playerid, Text:rachasds24); TextDrawShowForPlayer(playerid, Text:rachasds25); TextDrawShowForPlayer(playerid, Text:rachasds26); TextDrawShowForPlayer(playerid, Text:rachasds27); TextDrawShowForPlayer(playerid, Text:rachasds28); TextDrawShowForPlayer(playerid, Text:rachasds29); TextDrawShowForPlayer(playerid, Text:rachasds30); TextDrawShowForPlayer(playerid, Text:rachasds31); TextDrawShowForPlayer(playerid, Text:rachasds32); TextDrawShowForPlayer(playerid, Text:rachasds33); TextDrawShowForPlayer(playerid, Text:rachasds34); TextDrawShowForPlayer(playerid, Text:rachasds35); TextDrawShowForPlayer(playerid, Text:rachasds36); TextDrawShowForPlayer(playerid, Text:rachasds37); new score[100]; format(score, sizeof(score), "Score:%d",GetPlayerScore(playerid)); ScoreTd[playerid] = TextDrawCreate(467.000000, 423.000000, score); TextDrawBackgroundColor(ScoreTd[playerid], 255); TextDrawFont(ScoreTd[playerid], 3); TextDrawLetterSize(ScoreTd[playerid], 0.500000, 1.000000); TextDrawColor(ScoreTd[playerid], -65281); TextDrawSetOutline(ScoreTd[playerid], 1); TextDrawSetProportional(ScoreTd[playerid], 1); TextDrawSetSelectable(ScoreTd[playerid], 0); TextDrawShowForPlayer(playerid, ScoreTd[playerid]); SetPlayerVirtualWorld(playerid,2); new randomspawn = random(4);//Esto define que "randomspawn" serб un random de hasta 6 spawns. switch(randomspawn)//Esto crea un switch de "randomspawn". { case 0: SetPlayerPos(playerid, 995.4150,2711.8875,10.8203);//Aca van las coordenadas X, Y, y Z. case 1: SetPlayerPos(playerid, 1013.2001,2701.0527,10.8203);//Aca van las coordenadas X, Y, y Z. case 2: SetPlayerPos(playerid, 1033.4872,2692.8083,10.8203);//Aca van las coordenadas X, Y, y Z. }//Se cierra el switch GivePlayerWeapon(playerid,30,100000); GivePlayerWeapon(playerid,29,100000); GivePlayerWeapon(playerid,16,1); SetPlayerArmour(playerid, 100); SetPlayerSkin(playerid,29); new name [MAX_PLAYERS]; new stringa[256]; GetPlayerName(playerid, name, sizeof(name)); format(stringa, sizeof(stringa), "{19C0BA}[ ! ]:[%s] Fue a {FF0000}/cdp", name); SendClientMessageToAll(0xFFFF00FF,stringa); return 1; } CMD:blackops(playerid, params[]) { #pragma unused params TextDrawShowForPlayer(playerid, Text:pg); TextDrawShowForPlayer(playerid, Text:scoretxt); TextDrawShowForPlayer(playerid,Textdraw2[playerid]); TextDrawShowForPlayer(playerid,Textdraw3[playerid]); TextDrawShowForPlayer(playerid, Text:BO); TextDrawShowForPlayer(playerid, Text:BO1); TextDrawShowForPlayer(playerid, Text:BO2); TextDrawShowForPlayer(playerid, Text:BO3); TextDrawShowForPlayer(playerid, Text:BO4); TextDrawShowForPlayer(playerid, Text:BO5); TextDrawShowForPlayer(playerid, Text:BO6); TextDrawShowForPlayer(playerid, Text:BO7); TextDrawShowForPlayer(playerid, Text:BO8); TextDrawShowForPlayer(playerid, Text:BO9); TextDrawShowForPlayer(playerid, Text:BO10); TextDrawShowForPlayer(playerid, Text:BO11); TextDrawShowForPlayer(playerid, Text:BO12); TextDrawShowForPlayer(playerid, Text:rachasds); TextDrawShowForPlayer(playerid, Text:rachasds1); TextDrawShowForPlayer(playerid, Text:rachasds2); TextDrawShowForPlayer(playerid, Text:rachasds3); TextDrawShowForPlayer(playerid, Text:rachasds4); TextDrawShowForPlayer(playerid, Text:rachasds5); TextDrawShowForPlayer(playerid, Text:rachasds6); TextDrawShowForPlayer(playerid, Text:rachasds7); TextDrawShowForPlayer(playerid, Text:rachasds8); TextDrawShowForPlayer(playerid, Text:rachasds9); TextDrawShowForPlayer(playerid, Text:rachasds10); TextDrawShowForPlayer(playerid, Text:rachasds11); TextDrawShowForPlayer(playerid, Text:rachasds12); TextDrawShowForPlayer(playerid, Text:rachasds13); TextDrawShowForPlayer(playerid, Text:rachasds14); TextDrawShowForPlayer(playerid, Text:rachasds15); TextDrawShowForPlayer(playerid, Text:rachasds16); TextDrawShowForPlayer(playerid, Text:rachasds17); TextDrawShowForPlayer(playerid, Text:rachasds18); TextDrawShowForPlayer(playerid, Text:rachasds19); TextDrawShowForPlayer(playerid, Text:rachasds20); TextDrawShowForPlayer(playerid, Text:rachasds21); TextDrawShowForPlayer(playerid, Text:rachasds22); TextDrawShowForPlayer(playerid, Text:rachasds23); TextDrawShowForPlayer(playerid, Text:rachasds24); TextDrawShowForPlayer(playerid, Text:rachasds25); TextDrawShowForPlayer(playerid, Text:rachasds26); TextDrawShowForPlayer(playerid, Text:rachasds27); TextDrawShowForPlayer(playerid, Text:rachasds28); TextDrawShowForPlayer(playerid, Text:rachasds29); TextDrawShowForPlayer(playerid, Text:rachasds30); TextDrawShowForPlayer(playerid, Text:rachasds31); TextDrawShowForPlayer(playerid, Text:rachasds32); TextDrawShowForPlayer(playerid, Text:rachasds33); TextDrawShowForPlayer(playerid, Text:rachasds34); TextDrawShowForPlayer(playerid, Text:rachasds35); TextDrawShowForPlayer(playerid, Text:rachasds36); TextDrawShowForPlayer(playerid, Text:rachasds37); new score[100]; format(score, sizeof(score), "Score:%d",GetPlayerScore(playerid)); ScoreTd[playerid] = TextDrawCreate(467.000000, 423.000000, score); TextDrawBackgroundColor(ScoreTd[playerid], 255); TextDrawFont(ScoreTd[playerid], 3); TextDrawLetterSize(ScoreTd[playerid], 0.500000, 1.000000); TextDrawColor(ScoreTd[playerid], -65281); TextDrawSetOutline(ScoreTd[playerid], 1); TextDrawSetProportional(ScoreTd[playerid], 1); TextDrawSetSelectable(ScoreTd[playerid], 0); TextDrawShowForPlayer(playerid, ScoreTd[playerid]); SetPlayerVirtualWorld(playerid,2); new randomspawn = random(4); //Esto define que "randomspawn" serб un random de hasta 6 spawns. switch(randomspawn)//Esto crea un switch de "randomspawn". { case 0: SetPlayerPos(playerid, 966.2332,2627.6086,10.8203);//Aca van las coordenadas X, Y, y Z. case 1: SetPlayerPos(playerid, 979.9966,2614.0210,10.8203);//Aca van las coordenadas X, Y, y Z. case 2: SetPlayerPos(playerid, 952.1635,2648.0540,10.8203);//Aca van las coordenadas X, Y, y Z. }//Se cierra el switch GivePlayerWeapon(playerid,31,100000); GivePlayerWeapon(playerid,27,100000); GivePlayerWeapon(playerid,16,1); SetPlayerArmour(playerid, 100); SetPlayerSkin(playerid,285); new name [MAX_PLAYERS]; new stringa[256]; GetPlayerName(playerid, name, sizeof(name)); format(stringa, sizeof(stringa), "{19C0BA}[ ! ]:[%s] Fue a {FF0000}/blackops", name); SendClientMessageToAll(0xFFFF00FF,stringa); return 1; }
If(Player[Score] == X)
{
GivePlayerWeapon(playerid, 35, 100)
}
El cуdigo seria...
PHP код:
|
No funciona porque no tienes los enum de tu script donde guardar el score, debes modificar el cуdigo y cotejarlo con el que te dн que es solo un ejemplo.
Para obtener el vehiculo podrias obtener la posiciтn del jugador, le sumamos +2 a la posiciуn "X,Y,Z,A" y al llegar al Score deseado generar el coche. |