SA-MP Forums Archive
[Ayuda] Como hago para estos errores - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Ayuda] Como hago para estos errores (/showthread.php?tid=563191)



[Ayuda] Como hago para estos errores - danielss - 14.02.2015



Код:
395command:switch( playerid, params[ ] )
396{
397	#if GM_LANGUAGE == 0
398
399	if ( !IsPlayerSpawned( playerid ) )
400		return SendClientMessage( playerid, ERROR_COLOR, "(ERROR) Tienes que estar spawnado para usar este comando." );
401
402	if ( playerData[ playerid ][ P_SPECTATING ] > -1 )
403		return SendClientMessage( playerid, ERROR_COLOR, "(ERROR) Tienes que salir de spec para usar este comando." );
404
405	if ( IsPlayerInAnyVehicle( playerid ) )
406		return SendClientMessage( playerid, ERROR_COLOR, "(ERROR) No se puede usar este comando en un vehнculo." );
407
408	if ( playerData[ playerid ][ P_STARTING ] )
409		return SendClientMessage( playerid, ERROR_COLOR, "(ERROR) No se puede usar este comando ahora." );
410
411	if ( playerData[ playerid ][ P_PLAYING ] || playerData[ playerid ][ P_DUELING ] != DUEL_NONE )
412		return SendClientMessage( playerid, ERROR_COLOR, "(ERROR) No se puede usar este comando ahora." );
413
414	#else
415
416	if ( !IsPlayerSpawned( playerid ) )
417		return SendClientMessage( playerid, ERROR_COLOR, "(ERROR) You must be spawned to use this command." );
418
419	if ( playerData[ playerid ][ P_SPECTATING ] > -1 )
420		return SendClientMessage( playerid, ERROR_COLOR, "(ERROR) You can't create a vehicle while spectating." );
421
422	if ( IsPlayerInAnyVehicle( playerid ) )
423		return SendClientMessage( playerid, ERROR_COLOR, "(ERROR) You must be onfoot to use this command." );
424
425	if ( playerData[ playerid ][ P_STARTING ] )
426		return SendClientMessage( playerid, ERROR_COLOR, "(ERROR) You can't use this command now." );
427
428	if ( playerData[ playerid ][ P_PLAYING ] || playerData[ playerid ][ P_DUELING ] != DUEL_NONE )
429		return SendClientMessage( playerid, ERROR_COLOR, "(ERROR) You can't use this command now." );
430
431	#endif
432
433	showDialog( playerid, DIALOG_SWITCH_TEAM );
434
435	return true;
436}



Respuesta: [Ayuda] Como hago para estos errores - jotajeda - 14.02.2015

La falla parece ser en #if GM_LANGUAGE == 0 y en el #else , cambiale de nombre al comando tambien.


Respuesta: [Ayuda] Como hago para estos errores - danielss - 14.02.2015

Gracias ya lo pude solucionar ...