04.07.2013, 18:26
pawn Код:
CMD:marry(playerid,params[])
{
new string[500];
new ID,Nam[MAX_PLAYER_NAME],PName[MAX_PLAYER_NAME];
if(sscanf(params,"i",ID)) return SendClientMessage(playerid,COLOR_GREY, "USAGE: /marry [ID]");
for(new i = 4; i <= MAX_PLAYERS; i++){
if(!IsPlayerConnected(ID))return SendClientMessage(playerid,red,"That user is not connected.");
if(PlayerInfo[playerid][Married] == 1) return SendClientMessage(playerid,COLOR_GREY,"Error: You are already married/or/The person you want to marry is married");
if(PlayerInfo[ID][Married] == 1) return SendClientMessage(playerid,COLOR_GREY,"Error: You are already married/or/The person you want to marry is married");
offer[ID] = 1;
GetPlayerName(playerid,Nam,sizeof(Nam));
GetPlayerName(ID,PName,sizeof(PName)):
format(string,500,"Congratulations! %s has offered you to marry, to accept this marriage type /accept", PName);
SendClientMessage(ID,COLOR_GREY,string);
format(string,500,"Congratulations! You have offered %s to marry, Wait for him to accept the marry.", Nam);
SendClientMessage(playerid,COLOR_GREY,string);
}
return 1;
}
error 001: expected token: ";", but found ":"
C:\Documents and Settings\Rehan\My Documents\Downloads\samp03x_svr_R1-2_win32(1)\gamemodes\barron.pwn(6367) : error 029: invalid expression, assumed zero