Ayuda con else
#1

if(strcmp("/infoSwat", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,TEAM_SWAT,"Tu Objetivo Es Matar Gangs");
SendClientMessage(playerid,TEAM_SWAT,"Para Comprar Armas usa /comprarswat");
}
else
{
SendClientMessage(playerid,TEAM_GANGS, "Sos Gangs usa /infogangs");
return 1;
}

Alguien me podria decir que estoy haciendo mal?
porque me conecto como del TEAM_GANGS le aparece el mensaje de TEAM_SWAT Y Server: Unknown Command

Yo quiero que le aparesca Sos Gangs usa /infogangs

Gracias
Reply
#2

el comando tendria que ser asi:

Quote:

if(strcmp("/infoSwat", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][Swat] == 1)
{
SendClientMessage(playerid,TEAM_SWAT,"Tu Objetivo Es Matar Gangs");
SendClientMessage(playerid,TEAM_SWAT,"Para Comprar Armas usa /comprarswat");
}
else
{
SendClientMessage(playerid,TEAM_GANGS, "Sos Gangs usa /infogangs");
}
return 1;
}

Reply
#3

Gracias Death me sirvio y me anda
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)