PDA

View Full Version : Easy fix LOOK HERE!!


Chrillzen
11/11/2011, 06:53 PM
Hi guys, i never knew how to make commands like /spray 1 or /spray 2 instead of /spray1.

CMD:spraycrips 1(playerid,params[])


I mean like that, how do i do it?

antonio112
11/11/2011, 06:58 PM
CMD:spraycrips(playerid, params[])
{
if(strcmp(params, "1", false) == 0)
{
SendClientMessage(playerid, -1, "This is Spray Crips 1.");
}
else if(strcmp(params, "2", false) == 0)
{
SendClientMessage(playerid, -1, "This is Spray Crips 2.")
}
else if(strcmp(params, "crips", false) == 0)
{
SendClientMessage(playerid, -1, "Use /spraycrips crips command.");
}
else return SendClientMessage(playerid, -1, "Usage: /spraycrips (1, 2 or crips)");
}

Chrillzen
11/11/2011, 07:38 PM
CMD:spraycrips(playerid, params[])
{
if(strcmp(params, "1", false) == 0)
{
SendClientMessage(playerid, -1, "This is Spray Crips 1.");
}
else if(strcmp(params, "2", false) == 0)
{
SendClientMessage(playerid, -1, "This is Spray Crips 2.")
}
else if(strcmp(params, "crips", false) == 0)
{
SendClientMessage(playerid, -1, "Use /spraycrips crips command.");
}
else return SendClientMessage(playerid, -1, "Usage: /spraycrips (1, 2 or crips)");
}


Thanks i'll test it out.