CMD:startfw(playerid, params[])
{
if(!LoggedIn[playerid]) return 1;
if(PlayerData[playerid][pJob] == 1) return SendClientMessage(playerid, COLOR_RED, "You have started the fw")
CreateObject(3593, 2581.7631, 3199.7043, 1281.8310, 0.0000, 0.0000, -90.0000, 30.0);
}
CMD:startfw(playerid, params[])
{
if(!LoggedIn[playerid]) return 1;
if(PlayerData[playerid][pJob] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You have started the fw");
CreateObject(3593, 2581.7631, 3199.7043, 1281.8310, 0.0000, 0.0000, -90.0000, 30.0);
}
return 1;
}
|
It's normal. You're returning before the code, uselessly.
Use this: Код:
CMD:startfw(playerid, params[])
{
if(!LoggedIn[playerid]) return 1;
if(PlayerData[playerid][pJob] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You have started the fw");
CreateObject(3593, 2581.7631, 3199.7043, 1281.8310, 0.0000, 0.0000, -90.0000, 30.0);
}
return 1;
}
|
|
It's normal. You're returning before the code, uselessly.
Use this: Код:
CMD:startfw(playerid, params[])
{
if(!LoggedIn[playerid]) return 1;
if(PlayerData[playerid][pJob] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You have started the fw");
CreateObject(3593, 2581.7631, 3199.7043, 1281.8310, 0.0000, 0.0000, -90.0000, 30.0);
}
return 1;
}
|
CMD:startfw(playerid, params[])
{
if( (LoggedIn[playerid]) &&
(PlayerData[playerid][pJob] == 1) )
{
SendClientMessage(playerid, COLOR_RED, "You have started the fw");
CreateObject(3593, 2581.7631, 3199.7043, 1281.8310, 0.0000, 0.0000, -90.0000, 30.0);
}
return 1;
|
That is what happens when you use multiple returns.
Код:
CMD:startfw(playerid, params[])
{
if( (LoggedIn[playerid]) &&
(PlayerData[playerid][pJob] == 1) )
{
SendClientMessage(playerid, COLOR_RED, "You have started the fw");
CreateObject(3593, 2581.7631, 3199.7043, 1281.8310, 0.0000, 0.0000, -90.0000, 30.0);
}
return 1;
|