if command successed
#6

if you want to use this:
Код:
if(success) {
            SendClientMessage(playerid,COLOR_GREEN,"success");
        }
        else {
            SendClientMessage(playerid,COLOR_GREEN,"fail");
        }
You'll have to define a variable like this:
Код:
//this goes into your command start
new success;
//and then you just set this variable to 1 or 0 depending on how the command performed, or you could just send the message directly if it fails or succed.
success = 1;//if it succeded or:
success = 0;//if not
I don't realy get what you are trying to do, but basic you could just send a message if it succeed or not, just like:

Код:
//lets say it succeded here.
SendCleientMessage(playerid, -1, "Success");

//and in this part it didn't succed:
SendCleientMessage(playerid, -1, "Failure");
I don't really get the problem, do you want to like /sync [playerid] and check if another player is synced or do you want to do it on yourself? if you want to check another player then you'll have to use sscanf.
Anyway hope it helped.
Reply


Messages In This Thread
if command successed - by Opah - 21.08.2012, 08:03
Re: if command successed - by Ranama - 21.08.2012, 08:09
Re: if command successed - by Opah - 21.08.2012, 08:15
Re: if command successed - by Ranama - 21.08.2012, 08:25
Re: if command successed - by Opah - 21.08.2012, 08:35
Re: if command successed - by Ranama - 21.08.2012, 08:50

Forum Jump:


Users browsing this thread: 1 Guest(s)